Four nuns, two priests, one bishop and a candidate for Queens district attorney walk into a courtroom…

A disgraced attorney who was convicted of bribing a witness to lie for his gangbanger client was sentenced to two and a half years behind bars in Brooklyn federal court Monday — at a four-hour hearing wherethe clergy members and the GOP’s candidate for Queens DA showed up to offer support.

John Scarpa, 66, a former Queens prosecutor, was busted last year after he was caught on tape trying to get an ex-con-turned-private eye to convince a co-defendant of his client’s, reputed Crips member Reginald Ross, to take the fall for a murder.

Some of the clergy members, who traveled from congregations in the Catskills area, appeared to be praying during the marathon hearing.

Scarpa’s lawyer, Anthony Collelouri, said they came to show support for his client, although they declined to provide further details about why they made the trip.

Meanwhile, Joseph Murray — an ex-cop criminal defense attorney who is running as a Republican for Queens DA against Queens Borough President Melinda Katz — said it was a “no brainer” for him to show up to support his pal, as Scarpa had helped him with cases in the past.

“He’s been there for me,” he told the Post.

Prosecutors said Scarpa was representing Ross for the 2010 murder of John Williams when he conspired to arrange for an imprisoned gang member to take responsibility for the shooting — in exchange for an offer to help boost the man’s credibility among fellow inmates.

During the sentencing hearing, Assistant US Attorney Andrey Spektor called Ross a “cold-blooded killer that feeds puppies to an alligator-like creature in his basement,” apparently referring to a pair of caimans and the remains of a small dog that detectives found in his basement, according to Newsday.

Collelouri pushed for his client to be sentenced only to probation, arguing that Scarpa was bound as a defense attorney to offer the deal to Ross’ co-defendant because his client had demanded it — and that it wasn’t so much a “bribe” as a “tangential benefit”

“He had no choice. He was between a rock and a hard place,” Collelouri said.

But Judge Carol Amon was not swayed — and called Collelouri’s characterization “completely inappropriate, if not distasteful.”

“It doesn’t have to be a good bribe. Any bribe will do,” the judge said. “Are you kidding me?”

She ordered Scarpa to serve 30 months behind bars and report for prison by Jan. 3.

Scarpa is appealing his conviction.