A man charged with killing a sexual partner and setting his body on fire in a San Francisco park in 2011 was acquitted of murder Tuesday but convicted of a lesser charge.

David Munoz Diaz, 25, was found not guilty on the murder charge, but jurors convicted him of involuntary manslaughter, which carries a maximum penalty of four years in prison.

Diaz was also found guilty of mutilating human remains, misdemeanor destruction of evidence and arson.

The charges stemmed from the death of Freddy Canul-Arguello, whose body was found burned in Buena Vista Park on June 10, 2011, after firefighters responded to reports of a small brushfire.

Diaz's attorneys maintained throughout the trial that the incident was no more than a tragic accident.

The two men, who knew each other, went to the park to have sex that night after meeting in the Castro that evening, said Public Defender Jeff Adachi.

During the course of a sexual encounter, Diaz reluctantly agreed to choke Canul-Arguello, accidentally causing his death, Adachi said in a statement.

Panicked, Diaz then lit a nearby recycling container on fire to signal for help, pulled a fire alarm and called the police several times, Adachi said.

A friend of Canul-Arguello testified during the trial that he enjoyed being choked during sex and a medical examiner told the jury that his injuries were consistent with erotic asphyxiation.

The district attorney's office said that, though the details of the crime were gruesome, the decision made by jurors, who deliberated for six days, had to be respected.

"We find it very disturbing that the victim was killed and that his body was subsequently burned," said Alex Bastian, a district attorney spokesman. "However, we respect the jury's decision."

Adachi said that justice had been served.

"There was no motive for Mr. Diaz to intentionally harm his friend and no evidence to support a murder charge," he said. "Fortunately, his public defender was able to show that Mr. Canul-Arguello's death was a tragedy but not murder as the prosecutor claimed."