The judge, Sani Mohammed, sentenced Yongo after he pleaded guilty to criminal trespass and theft.
Mohammed gave the convict an option to pay a fine of N40,000 fine.
Earlier, the prosecutor, Vincent Osuji, told the court that the matter was reported by one Shefianu Ibrahim of Ammar Ibn Yasir Mosque, Karu, Abuja, at the Karu Police Station, on December 4.
Osuji said that the convict criminally entered the mosque and stole a ZTE cell phone that had been plugged to charge, and belonging to the complainant.
The prosecutor said the offence contravened the provisions of sections 348 and 287 of the Penal Code.