A retired cop claims a skittish police lieutenant booked him on a bogus assault charge because the law-enforcement officer feared looking like he had doled out a favor, with an officer telling him “everything is micro-managed now” in the NYPD.

In his Brooklyn federal lawsuit, Mark Greenberg claims he spent 15 nightmarish hours in a general-population cell while fearing that his law-enforcement background would leak and he would become a target for other inmates.

A sheepish officer admitted to Greenberg that he was only arrested because an unnamed lieutenant didn’t want to appear like he was doing him a favor, the suit claims that.

The city Law Department declined to comment citing the pending litigation.