In a bizarre courtroom speech, a Queen defense attorney said the life of a murdered transgender prostitute wasn’t worth much — and argued that her convicted killer shouldn’t be punished as if he had killed someone “in the higher end of the community.”

“A sentence of 25 years to life is an incredibly long period of time judge,” John Scarpa said Thursday as he asked a judge to go easy on his client, Rasheen Everett, for killing hooker Amanda Gonzalez-Andujar in 2010.

“Shouldn’t that be reserved for people who are guilty of killing certain classes of individuals?”

Then, taking callousness to a new level, he said: “Who is the victim in this case? Is the victim a person in the higher end of the community?”

Queens Supreme Court Justice Richard Buchter scolded Scarpa as he sentenced Everett to 29 years in prison.

“This court believes every human life in sacred,” he said. “It’s not easy living as a transgender, and I commend the family for supporting her.”

Everett, 32, was convicted of strangling Gonzalez-Andujar last month. They had met through an ad, and he was allegedly shocked to find she had male genitalia.

Throughout the proceedings, Scarpa stunned the victim’s family as he detailed her sexual past.

“Amanda was engaged in a life of prostitution, life of drug use, HIV exposure,” Sharpa said. “She was having sex with other individuals knowing she had the chance of spreading diseases.”

The shameless Everett even chuckled throughout the emotional testimony of the victim’s brother, Ruben Andujar.

“The pain my family feels is unbearable,” Ruben had said. “It’s all like a nightmare, and I’m still waiting to wake up.”

Butcher blasted Everett, who declined to speak when the judge gave him the chance.

“The defendant is coldhearted and violent menace to society,” he said.

Everett winked at loved ones in court before he was taken away.