An NYPD cop miscarried three babies because of on-the-job racial discrimination that included a supervisor screaming at her for not wearing her uniform pants — into which she couldn’t fit, a lawsuit claims.

Jessenia Guzman says she has tragically lost three babies — twins born prematurely in 2010, and another pregnancy in 2012 — after being routinely badgered at Manhattan’s 24th Precinct.

“Pregnant white females in [Guzman’s] command are routinely treated with exceeding accommodation, while minority officers are continually denied similar treatment,” she charges in a Manhattan federal court lawsuit.