A wanted man has turned himself into police hands after losing a bet he made with police on Facebook.

Michael Zaydel had promised to give himself up to police if a Facebook post about an existing arrest warrant received more than 1,000 shares.

The 21-year-old even promised to bring dozen doughnuts to police officers if they were victorious in the challenge.

“I’m not worried about it,” he wrote. “If your next post gets 1,000 shares I’ll turn myself in with a dozen doughnuts and that’s a promise.

“And I’ll pick up every piece of litter around your public schools.”

In a follow-up post, the department said he “may or may not be a man of his word,” adding, “it is our experience everyone gets caught at some point. He has drawn a lot of attention to himself, and that makes it hard to hide from reality.”

The fugitive eventually surrendered to police, fulfilling his promise by arriving at the station with doughnuts and a bagel.

“Zaydel made good on his promise to turn himself in for his outstanding warrants,” the department said.

“He walked in on his own, and not only did he bring the doughnuts, he brought one bagel! We would again like to express our gratitude for the support of all who followed this, shared it, and left us positive feedback.”

Mr Zaydel was sentenced to 39 days in jail after pleading guilty to breaking the terms of his probation.