A Brooklyn woman says she was arrested and spent five days in jail after police confronted her following a trip to a Bed-Stuy bodega — and then tried to justify the arrest by concocting a scenario even a judge refused to believe, according to a lawsuit.

Catherine Cyrus, 24, had just bought a Sprite in February 2012 when she found herself surrounded by officers demanding to see her ID and her purchase.

Revealing the soda, an incensed Cyrus refused to leave the area when cops told her to, and quickly found herself in handcuffs, according to a Brooklyn federal court lawsuit filed last week.

She was charged with disorderly conduct and obstructing governmental administration. Cyrus says she refused to allow officers to take her fingerprints, and spent five days in jail before she was released.

When the case came up for trial, Judge ShawnDya Simpson slammed one of the officers, who had claimed in a police report that Cyrus was arrested because she had tried to hit one of them, according to the lawsuit.

Despite the allegation, officers never charged Cyrus with assault, and Simpson called the officer’s tale ­“totally incredible” and dismissed the case.