The victim was found guilty of trespassing and theft.
A 20-year-old man was on Tuesday flogged five lashes for stealing nine measures of sorghum in Jigawa State.
Abdullahi Ya'u was found guilty of theft and trespass by an Islamic Sharia Court sitting in Dutse, the state's capital.
The judge, Muhammed Adamu, also sentenced the victim to five months in prison with an option of N3,000 fine.
He ordered that the victim be flogged five times in public to serve as a deterrent to others without an option of fine.
The convict was, however, after receiving the lashes, freed because he paid the fine of N3,000
The judge said the action of the victim contravenes section 183 and 148 for trespass and theft contrary to the penal code law of Jigawa State.
Mr Ya'u was arrested and prosecuted on Tuesday last week by the police in the state for trespassing and theft.
The flogging exercise took place in the court premises after a prosecutor asked the victim whether he was satisfied with the judgement or if he wanted to appeal the judgement.
The victim, Mr Ya'u, said: "I'm satisfied with the court ruling and I will not appeal the judgement."
A court official then administered the flogging on Mr Ya'u.
Jigawa, like many states in Northern Nigeria, uses a penal code that leans heavily on the Islamic Sharia law. There are also sharia courts and judges in the Northern states to implement the law.