A herd of donkeys feasting on plants intended for a local jail in northern India tried the patience of the facility’s workers, who eventually lost it and locked up the voracious animals. The animals were set free after spending four days behind bars.

On Monday, the group of four-legged former convicts walked out the prison gates in the city of Orai in Uttar Pradesh, according to media reports. At least one of the ex-cons seemed relieved as it trotted ahead, as seen on the video, which was shared by the local sources.

The mischievous eight had indulged on some expensive plants that were being grown for display at the jail on the orders of one of the facility’s senior officials, according to Head Constable RK Mishra. “Despite warnings, the owner let loose his animals here so we detained the donkeys,” India Today quoted him as saying.

“We made all the arrangements for them inside. They were fed two times a day,” a jail worker said. The animals were rounded up on November 24 after prison workers failed to contact their owner, named Kamlesh. “We called the owners several times, and each time, they said the animals didn’t belong to them,” said Sitaram Sharma, the jail superintendent.

READ MORE: Indian police claim rats drank 900,000 liters of confiscated alcohol

The man, however, is said to have searched his missing herd and asked a local politician for help when he learned about the bizarre arrest. The unfortunate owner had to post bail before he was allowed to get the smooth criminals back.