It was a huge giveaway.

A Brooklyn jail guard’s massive, hook-shaped penis helped the feds nab him for sexually assaulting inmates, it was revealed in court Tuesday as jurors listened on in shock.

Lt. Eugenio Perez is accused of forcing women at the Metropolitan Detention Center to give him oral sex — and prosecutors said they were able to nail him as a suspect when multiple accusers described his distinctive phallus.

Indeed, the schlong arm of the law caught up to Perez when the feds made him drop trou to make a positive ID.

Just what made Perez’s member so memorable also became the big reveal on the first day of the Brooklyn jail guard’s sexual abuse trial.

“He wasn’t circumcised. It was big, and it was like a hook…It was humongous and it curved,” a 38-year-old former inmate of the federal lockup in Sunset Park testified anonymously.

But, she noted, his mammoth member kind of smelled bad.

“If it didn’t stink I would have been all over that s–t,” she continued, describing the odor as “pissy,” as jurors’ eyebrows shot up.

The woman, who was jailed at the time on a drug charge but has since been released, said Perez had approached her when she was getting cleaning supplies from the camera-less lieutenants’ office at the jail — and at first she embraced his hugs and kisses because she was lonely.

But when he whipped out his hefty pecker she got scared.

“He just tried to like, you know, push my head down so I could suck his d–k,” the woman testified, weeping.

“I felt used at that point. And I felt like I was making a mistake. Like, I wanted to be touched by another human being, but it just wasn’t him. I just was lonely…It made me feel normal again, alive. Because when you’re in jail, you feel dead. ”

She said she left and wasn’t forced into doing anything.

On cross examination, she exploded as the defense attorney asked about her plea deal.

“You don’t know the details about my f—ing case!…I pled to it because I had to! You’re not going to f—ing badger me with my past,” she yelled.

Before storming off the stand, she snarled at Perez: “Your lawyer is a d–k.”

Perez was one of three guards charged last May with turning the detention center into their personal harem.

“This is a case about power, opportunity and abuse…Eugenio Perez, used his position and power as a law enforcement officer, a lieutenant at the Federal Bureau of Prisons to sexually abuse five different women, female inmates entrusted to his care and custody,” prosecutor Nadia Shihata said in her opening statements.

“He arranged for them to clean on the second floor, of the prison, exposed his penis through the zipper of his pants, masturbated and demanded oral sex.”

There was even a pattern to how he ejaculated, she said — into a paper towel that he then folded up to dispose.

One juror sat with her hand over her mouth as Shihata spoke.

Perez’s fellow lieutenant, Carlos Richard Martinez, was convicted in January of raping an inmate and faces up to life behind bars.

Guard Armando Moronta in November pleaded guilty to sexually abusing inmates and smuggling drugs into the facility. He faces up to 95 years behind bars and a $1 million dollar fine when sentenced.