Algiers: An Algerian teenager set himself on fire in front of horrified high school classmates after failing final exams and not being allowed to repeat his senior year, a report said Tuesday.

The 19-year-old was in critical condition at a hospital in the western town of Oran after the incident that unfolded at the Souiyah El Houari high school on Monday, the French-language Quotidien d'Oran reported.

The teen doused himself with gasoline and set himself on fire with a lighter outside the teachers lounge.

As some students and teachers witnessing the incident fainted, the school principal rushed to the boy and tried to put out the flames, burning his hands in the process, the newspaper said.

According to classmates, the teenager was distraught because the school refused a request to repeat his senior year after he failed his final exams, essential to receiving a high school diploma.