Salman Rushdie described in graphic detail Tuesday the frenzied moments in 2022 when a masked man rushed at him on a stage in western New York and repeatedly slashed him with a knife, leaving him with terrible injuries and fearful he would die.

Rushdie took the stand during the second day of testimony at the trial of Hadi Matar, 27, who has pleaded not guilty to attempted murder and assault in the attack that also wounded another man. It was the first time since the stabbing that the 77-year-old author was in the same room as the man accused of trying to kill him.

Rushdie recalled feeling “a sense of great pain and shock, and aware of the fact that there was an enormous quantity of blood that I was lying in” after the attack at the Chautauqua Institution — the nonprofit art and education center about 75 miles south of Buffalo where he was supposed to present a lecture that day.

“It occurred to me that I was dying. That was my predominant thought,” he said, adding that the people who subdued his assailant likely saved his life.

As he recounted the attack, his wife Rachel Eliza Griffiths cried from her seat in the courtroom’s second row.

“I only saw him at the last minute,” Rushdie said of the man who rushed across the stage and stabbed him repeatedly with a 10-inch blade.

“I was aware of someone wearing black clothes, or dark clothes and a black face mask. I was very struck by his eyes, which were dark and seemed very ferocious.”

Rushdie said he first thought his attacker was striking him with a fist. “But I saw a large quantity of blood pouring onto my clothes,” he said. “He was hitting me repeatedly. Hitting and slashing.”

Rushdie said he was struck again in his chest and torso and stabbed in his chest as he struggled to get away. Rushdie was blinded in one eye in the attack.

“I was very badly injured. I couldn’t stand up any more. I fell down,” he said.

He spent 17 days at a Pennsylvania hospital and more than three weeks at a New York City rehabilitation center, where he had to relearn basic skills like squeezing toothpaste from a tube. He detailed his months of recovery in a memoir released last year.

“I think I’m not quite at 100%. I think I’ve substantially recovered but it’s probably 75 to 80%,” Rushdie testified. “I’m not as energetic as I used to be. I’m not as physically strong as I used to be.”

Matar, who was seated about 20 feet away from Rushdie in the courtroom, often looked down during his testimony.

Lynn Schaffer, a public defender representing Matar, began the cross-examination by asking the Booker Prize-winning author about his career. The questioning was brief, low-key and for a moment friendly. She asked Rushdie if he would be surprised that “Bridget Jones’s Diary,” in which he makes a cameo, is her favorite movie.

“I am surprised,” Rushdie said, joking that it was his “most important work.”

The only hint at a possible defense strategy was a question about whether trauma can affect memories.

Rushdie acknowledged that he has a false memory, that he thought he stood up when he saw the attacker approaching. District Attorney Jason Schmidt detailed during his opening statement Monday how Rushdie was so stunned that he remained seated in an armchair even as his assailant stabbed him.

Schaffer challenged Rushdie to remember how many times he was struck.

“I wasn’t counting at the time. I was otherwise occupied. But afterward I could see them on my body. I didn’t need to be told by anybody,” Rushdie said.

No one asked Rushdie to identify his attacker in court and he declined to be interviewed as he left the courthouse after about an hour of testimony.

Later Tuesday, Chautauqua County Sheriff Deputy Jason Beichner identified Matar as the assailant he helped detain backstage after the attack. He testified that Matar was calm and cooperative, while his clothes were disheveled and there appeared to be blood on his hands.

The trial is expected to last up to two weeks.