Iranian nationals Ahmad Abolfathi Mohammad and Sayed Mansour Mousavi were arrested in June 2012 and led officials to a 15-kilogram stash of the explosive RDX.
Magistrate Kaire Waweru Kiare today sentenced the two to life in prison on one charge and additional years in prison on other charges.
Prosecutors said the two had explosives "in circumstances that indicated they were armed with the intent to commit a felony, namely, acts intended to cause grievous harm."
Iranian agents are suspected in attacks, or thwarted attacks, around the globe in recent years, including in Azerbaijan, Thailand and India. Most of the plots had connections to Israeli targets.