A man described as a ringleader in the alleged gang rape of a 16-year-old girl outside a Richmond homecoming dance took a turn as a witness Thursday, telling jurors at the trial of two other men that he had seen one of them sexually assault the girl in a dimly-lit courtyard.

Manuel Ortega, 22, took the stand as part of a plea deal that sent him to prison for 32 years.

He was at times hard to pin down, but he offered a picture of a chaotic, horrifying scene. And he gave the prosecution a key piece of testimony when he said he saw defendant Jose Montano rape the heavily intoxicated girl on Oct. 24, 2009.

Ortego admitted to the Contra Costa County jury that he had tried to engage in a sexual act as well with the girl, who has been referred to only as "Jane Doe." Ortega was convicted of rape, but on Thursday he maintained, "I didn't rape her."

Pressed by both prosecutor John Cope and defense attorney Jane Elliot on what exactly he had seen the 22-year-old Montano do outside the school dance, Ortega responded, "I'm not gay," as he sat in a jail jumpsuit with a county sheriff's deputy beside him.

Ortega - who said he was "pretty drunk" during the incident - testified he didn't remember seeing the second man who is now on trial, 20-year-old Marcelles Peter of Pinole, in the courtyard.

Ortega repeatedly sparred with Cope in the Martinez courtroom, saying "I don't remember" when asked why some statements he made to police in 2009 conflicted with his trial testimony. He told the prosecutor, "I just told you," when asked to clarify details.

Both Cope and defense attorneys have told jurors to be cautious with witnesses to the alleged gang rape, saying they have many good reasons to lie.

Ortega said an assault began after the victim, who was summoned to the courtyard by a boy who knew her, began drinking from a bottle of brandy. "She cracked it open and started chugging it," he said.

According to the prosecution, a group of men then raped the girl, punched and kicked her, dragged her around and urinated on her. While some assaulted the girl with a walkie-talkie and other items, others took cell-phone pictures, authorities said.

After the alleged gang rape, the girl was found to have a 0.35 percent blood-alcohol level, more than four times the legal driving limit in California.

Both Montano and Peter are charged with forcible rape, rape by foreign object and forced oral copulation, with each count alleging that the men acted in concert with others. They are being tried in front of two juries that will hear some evidence together and some separately.

Ortega and another man, Ari Morales, earlier agreed to plea bargains that sent them to prison for 32 and 27 years, respectively. A third defendant won a dismissal during a preliminary hearing, and two others, John Crane and Elvis Torrentes, still await trial.

Another witness, Salvador Rodriguez, told jurors Wednesday that he had tried to help the girl, covering her partially naked body with his shirt. Rodriguez, who was not charged, said Montano - his roommate at one point - ripped off the girl's panty hose and punched her.

"I was trying to stop her from being hurt, raped, possibly dying," Rodriguez said.

Ortega said Rodriguez "kept on saying no" when the group tried to continue the attack. "So everybody just started leaving," Ortega said.

Prosecutors said none of the young men present during the attack called 911.