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.
The 77-year-old writer 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 art and education centre where he was presenting a lecture.
"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."
The author 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 centre, where he had to re-learn basic skills like squeezing toothpaste from a tube. He detailed his months of recovery in a memoir released last year.
Matar, who was seated about 6 metres away from Rushdie in the courtroom, often looked down during his testimony.
The only hint at a defence 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.
The trial is expected to last up to two weeks.
Security was notably tighter ahead of Rushdie's appearance, with several law enforcement vehicles parked outside the courthouse and security posted on the roof of the jailhouse opposite.
Rushdie spent years in hiding after Iranian leader Ayatollah Ruhollah Khomeini announced a fatwa calling for his death, after his novel The Satanic Verses, which some Muslims consider blasphemous
Matar is a dual Lebanese-US citizen, born in the US to parents who emigrated from Yaroun in Hezbollah-dominated southern Lebanon near the Israeli border, according to the village's mayor. Matar's mother has said she believes her son was radicalised in 2018 when he spent time with his father in Yaroun.
On Monday, Matar calmly said "Free Palestine" as he was led into the courtroom. On Tuesday he said in a dull chant, " From the river to the sea, Palestine will be free" while entering the room.
with Reuters