WESTMINSTER, Colo. — A 16-year-old student set himself on fire in the cafeteria of a high school in a Denver suburb on Monday in front of horrified classmates in what police said was an apparent suicide attempt.

Investigators were examining a note the teenager posted online before the incident at Standley Lake High School in Westminster, Colo., a police spokeswoman said.

The youth suffered burns over 80 percent of his body and was hospitalized in critical condition, according to a police spokeswoman.

The youth, who was not publicly identified, walked into the cafeteria around 7 a.m. He lit himself on fire before a school custodian grabbed a fire extinguisher and quickly doused the flames, police said in a statement.

A teacher who was also in the cafeteria suffered a minor cut to her hand during the incident when she broke glass to get at the extinguisher, police spokeswoman Cheri Spottke said. No one else was hurt.

Details of the incident, including what type of flammable liquid the boy used and how he ignited the fire, were under investigation, Spottke said. But one student told KOA News Radio in Denver that the boy had doused himself with gasoline.

Spottke said the incident apparently unfolded too quickly for bystanders to intervene to stop the self-immolation.

“It was pretty quick, and there wasn’t an opportunity,” she said.

The incident did not appear to be aimed at anyone else, and police were not aware of any threats to the school.

“We’re assuming it was a suicide attempt,” Spottke said, adding that investigators were looking at a message the boy apparently posted to his Facebook page shortly before the incident. She declined to characterize the note.

Several other students were in the cafeteria at the time, and investigators were speaking to some who witnessed the incident, Spottke said.

“It’s pretty traumatic to witness something like this, and we’re going to get them any help they need to get through this incident,” she told reporters at the school.

As a precaution, investigators were conducting a thorough search of the school to confirm that no explosive or incendiary devices were left anywhere in the building.

The Westminster Fire Department said that firefighters arriving at the school were mostly dealing with smoke, and the campus had been evacuated and would remain closed for the day.

Some 1,400 students are enrolled at the high school in Westminster, an upper-middle-class suburb of about 100,000 people on the northwestern edge of Denver that is part of the Jefferson County School District, the largest in the state.

The same district contains Columbine High School, where a pair of students fatally shot 12 classmates and a teacher before killing themselves in a 1999 massacre.

Columbine was the scene of a security lockout last week after authorities received telephone threats against the school. Police later determined the threats were not credible.

Colorado schools have been on edge after an 18-year-old student at another Denver-area campus, Arapahoe High School in Centennial, shot a classmate to death and killed himself with a shotgun in December. Police have said the student gunman in that incident was believed to have been acting in retaliation for discipline he received from the school’s debate team coach.