A labourer identified as Abubakar Usman received six strokes of the cane for stealing two generators.
The police charged 31-year-old Usman who resides in Gwarinpa, Abuja, with joint act, criminal trespass and theft.
Delivering judgment, Mr Gambo Garuba, an Upper Area Court judge in Zuba, Abuja, sentenced Usman after he pleaded guilty to the charge and begged the court for leniency.
Garuba charged the convict to desist from committing crime.
Earlier, the Prosecution Counsel, Chinedu Ogada, told the court that the complainant, Akpen Justice, reported the matter at the Gwarinpa Police Station, on July 26.
Ogada told the court the convict and one other, now at large criminally trespassed into plot 489, 24 crescent 2nd avenue Gwarinpa, where complainant is a security guard and stole two fireman generator from the compound.
Ogada , further stated that during police investigation the convict made a confessional statement and the two stolen generator were recovered from him.
The offence, he said, contravened the provisions of sections 79, 348 and 288 of the Penal Code.