Updated

Four years isn't much time to spend behind bars for stabbing a man 20 times, but that's what one man got for a killing in Fresno, Calif., last year, after a blind date in a bar went terribly wrong.

Estanislao Martinez (search) didn't deny that he repeatedly stabbed Joel Robles with a pair of scissors, but his lawyer told the judge he had a good excuse — he killed the victim in what he called a "gay panic."

Martinez and Robles had been out drinking and went back to Martinez' apartment for some privacy. But at the time, Martinez thought Robles was a woman. He soon found out Robles was a cross-dressing man.

"The decedent represented himself to be female. She/he said he was female to him," said Martinez' lawyer, Roberto Dulce. "There was some sexual activity that occurred. All under the impression that Mr. Martinez was engaging in sexual activity with a woman."

Martinez went into a rage after he realized Robles was a man, stabbed him repeatedly, then jumped out his window onto the street. People found him naked and covered in blood a short time later.

In court, Dulce, a public defender, argued that the attack was a case of "gay panic," not cold-blooded murder.

"It's a rage that ... doesn't justify the conduct, but excuses it to a certain degree and therefore it's not murder," Dulce said.

Dulce said the panic Martinez felt was a sort of temporary insanity brought on by the shock of realizing he had been duped by a transgender (search) man. Dulce said his defense is similar to "heat of passion" arguments made in the past.

"When ... you come home [and] you find your wife in bed with another man and you wind up killing either one of them, it's voluntary manslaughter," Dulce said.

Martinez pleaded guilty to voluntary manslaughter and could have faced as many as 11 years in prison. The crime and the punishment have outraged the gay community.

"It wasn't manslaughter. So, what is their excuse? A plea-bargain so they don't have to deal with it? I think they've made it abundantly clear that transgender people are not valued and it's OK to kill them," said Charlotte Jenks, a gay and lesbian activist in Fresno.

Because Martinez pleaded guilty, the case is not eligible for appeal by either side. And with good behavior, Martinez could be a free man in less than three years.

Click in the video box above for a complete report by FOX News' Laura Ingle.