BANGKOK (AP) — A court in Thailand has convicted two Iranian men for their involvement in a botched bomb plot that officials believe was aimed at Israeli diplomats in Bangkok.

The court sentenced 39-year-old Saeid Moradi to life in prison Thursday for attempting to murder a police officer and carrying explosives. It also sentenced 43-year-old Mohammad Kharzei to 15 years in jail for his role in setting off the blasts.

The pair was detained in February 2012, shortly after a cache of homemade explosives accidentally blew apart the Bangkok villa where they were staying.

Both had claimed innocence in the case.