A corrections lieutenant at the Brooklyn Detention Center would brag about his unusual penis as he sexually attacked female inmates — so the feds made him drop his pants to clinch the case against him, prosecutors said Thursday.

Three of Lt. Eugenio Perez’s five victims separately gave investigators matching descriptions of the prison guard’s penis right down to the nickname he’d bestowed on it, according to new court papers.

Brooklyn federal prosecutors were then able to confirm the description thanks to a search warrant that ordered Perez to show his penis off one more time — for the record.

Perez, 46, of Brooklyn was one of three guards charged Thursday with turning the detention center into their personal, often violent, sex den.

A second lieutenant, Carlos Richard Martinez, 47, of Brooklyn is charged with a series of forcible rapes against a petite and “terrified” inmate in her late 20s, court papers say.

“It’s only PREA when you don’t like it,” Martinez joked in a sick Facebook post, referring to the Prison Rape Elimination Act — which, as a lieutenant, he was charged with upholding.

The post included a photo of two men in Brooklyn Detention Center uniforms, papers say.

Both lieutenants would summon their victims to their office for “cleaning” duty, sexually attack them and then threaten them with extra prison time if they told, according to the court papers against them.

Perez would tell his victims that even if they did rat him out, no one would believe them because he is a lieutenant, court papers say.

Both face a maximum sentence of life in prison.

A third correction officer at the prison, Armando Moronta, 39, of Brooklyn is accused of repeatedly having sex with three female inmates in an office at the facility.

He faces a maximum of up to 60 years prison.