A man charged with assault — but who claimed he was the victim of a gay bashing — was cleared by a Brooklyn jury today.

Ricardo Muniz was facing up to 25 years in prison for allegedly smashing Jose Cruz in the head with a wooden bludgeon.

But the prosecution’s main witness, Cruz’s friend German Serrano, was less than convincing when he testified that before the brawl with Muniz, he and Cruz spent seven hours in a bar and consumed just three beers between them.

Video from outside the club showed Cruz staggering and hospital records revealed his blood alcohol level was almost 0.21 – more than twice the legal limit to drive.

“He [Serrano] was lying,” a juror said after the panel found Muniz not guilty on all counts. “It was the cross examination. He [defense lawyer Deron Castro] killed them.”

Muniz had been dancing with and kissing another man inside the Gran Prestigio bar in Kensington in July 2009, when Cruz began making comments.

A fight erupted on the street and Muniz got the better of the scrap.

“Clearly, Mr. Muniz is the victim here of a gay bashing,” Castro said. “I believe the NYPD chose to sweep that under the rug and not treat it for what it was – a gay bash.”

Despite his victory on the criminal case, Muniz remained in jail last night on an immigration hold, which was sparked by the assault charges.

He faces a hearing in immigration court to see whether he’ll be deported to his native Mexico.