Two of the three students seriously injured in the attack told the court they thought they were going to die when they were sprayed with flaming petrol in the hall at Sullivan Upper School in Holywood, Co Down, Northern Ireland.
A former pupil, alleged to have a grudge against the school, has denied attempting to murder the three schoolboys.
Garnet Bell, 46, of Inverary Avenue, Belfast, also denies grievous bodily harm and arson, although his lawyers have formally admitted that he wielded the flame-thrower made from a fire extinguisher. The jury of 11 men and one woman have been asked to decide upon his intent in carrying out the attack.
One of those injured in the attack, Darren Crawford, told the court that he "looked right into" the nozzle of the improvised flame-thrower seconds before it was turned on the 31 pupils in the hall.
"I really wasn't aware of what was happening," he said. "All I could see was flames all around me."
The 18-year-old, who was preparing to leave the exam hall, fell to the floor as he tried to escape the fireball.
"My legs were caught in the chair. I thought that was it, I was going to die," he said.
Another student, Stephen Crossland, said he saw the attacker pull out a lighter when he entered the hall with the device. "He tried to flick it once or twice, then I was covered in a ball of flame," he said. "I thought he was trying to kill me. I could hardly breathe. I thought I was dying.
"I heard lots of people screaming - severe panic. I think I was screaming myself. I think they were shouting 'Madman'."
Both victims, who were visibly scarred and wore protective gloves, said they ran from the hall to lavatories where they were doused with water.
Darren Crawford said he saw Stephen Crossland when he arrived in the lavatory.
"He was blackened. The skin on his face - it looked like it had melted. My hands were blackened and melted as well."
Stephen Crossland said he could see skin hanging off his left hand and could taste petrol in his mouth.
They described the pain as "excruciating" and "unbelievable". Both have received skin grafts and will require further surgery.
A third pupil who was also seriously injured is expected to give evidence later this week. A further three students suffered minor injuries.
Maureen Lynas, a teacher at the school, told the court that she found Darren Crawford outside the examination hall after the fire alarm went off.
She said: "He was actually black from head to foot ... He didn't seem to know where he was. The clothes were burnt completely to him and the skin was actually starting to come off."
The trial was adjourned until today.Reuse content