A U.S.-trained Pakistani scientist being tried on charges she tried to kill Americans while she was detained in Afghanistan in 2008 told a jury Thursday that she never picked up a gun and fired at them.

"This is crazy," Aafia Siddiqui testified when cross-examined about the accusations at her federal trial in Manhattan. "It's just ridiculous. ... I never attempted murder, no way. It's a heavy word."

In animated and sometimes combative testimony, the 37-year-old Siddiqui claimed that she was shot by two men while trying to escape.

"Somebody saw me and said something, a guy standing at the opposite end of the room saw me and shot me. And then another came from here and shot me. And then I just passed out," she said.

She told jurors her case is an example of how authorities "frame people," she said.

Siddiqui, who keeps her face veiled behind a white scarf, is on trial on attempted murder charges and has been prone to courtroom outbursts. She took the stand over the objections of her defense lawyers who said her "diminished capacity" would turn her testimony into a "painful spectacle." The lawyers last year lost a pretrial bid to have her declared incompetent to stand trial.

U.S. authorities said Siddiqui picked up an unattended U.S. military assault rifle at an Afghanistan police station on July 18, 2008, and fired two rounds at FBI agents and U.S. Army soldiers. She missed and was wounded by return fire.

Prosecutors say the shooting occurred as Siddiqui was about to be questioned a day after she was caught by Afghan police outside a governor's building carrying bomb-making instructions and a list of New York City landmarks including the Statue of Liberty.

Siddiqui said she was shot shortly after she poked her head around a curtain to see if there was a way she might slip out. She said she wanted desperately to escape because she had been tortured in a secret prison and feared she would be taken there again.

"I was very confused," she said. "I wanted to get out. ... I was afraid."

She not only denied firing the M4 assault rifle, she said when she heard about the allegations she thought, "What does an M4 look like?"

On the way to the hospital, she said she heard others fearful she might die and one of them said: "A couple of us are going to lose our jobs."

Shortly before Siddiqui testified, U.S. District Judge Richard M. Berman ruled that she could take the stand, saying it was well established law that it is the personal right of a defendant.

Asked by Berman if she wanted to testify, Siddiqui said, "Yes sir."