These cops really stepped in it.

A federal jury yesterday awarded a Queens woman $59,000 for a beating she sustained at the hands of two NYPD officers who accused her of failing to pick up after her tiny pooch, Psotka, before heading to church.

Anna Stanczyk said the cops confronted her along Shore Front Parkway in Rockaway and accused her of not picking up the dog poop as she walked the terrier in November 2010.

When she insisted that it wasn’t her dog that left the mess — she said he’d only urinated — the issue escalated and turned physical.

The cops used excessive force on Stanczyk, the Brooklyn jury found, when she was punched and manhandled, and the police cruiser’s door was deliberately slammed on her leg.

She ended up with a black eye, facial bruises and an injured knee.

Adding insult to injury, Stanczyk was treated at a hospital and then jailed at Central Booking — all over the doggie droppings.