Fifteen people at a Bethesda apartment house were taken to hospitals Saturday morning as carbon monoxide from a generator under repair spread throughout the building.

Eight people were listed in serious condition, but none have life-threatening injuries, officials said. Two were flown to hospitals by helicopter, said Scott Graham, assistant chief of Montgomery County Fire and Rescue Service.

The toxic gas apparently came from a generator that maintenance workers were repairing about 10:30 a.m. at the Middlebrooke Apartments at 5015 Battery Lane, Graham said. One worker fainted, and a resident who was near the back of the 11-story building was also overcome.

Fire crews, which were stationed just across the street, ran to the building wearing gas masks. A hazardous materials squad also reported to the scene.

More than 150 residents were evacuated from the 97-unit building. Firefighters conducting floor-by-floor measurements found the gas content of the air at between 200 and 800 parts per million, which could have been lethal if not treated quickly. Normal levels of carbon monoxide are about 35 parts per million.

“We call carbon monoxide the silent killer,’’ said Graham, noting that the gas is colorless and orderless. He added that the situation would have worsened if there weren’t so many fire responders at the nearby Bethesda-Chevy Chase Rescue Squad station, where a community open house was planned.

“There were a lot of blessings today,” Graham said.

As fire officials addressed the situation, children across the street donned plastic fire hats and played in a bounce house.

Residents sat on the building’s front lawn as they waited nearly four hours before they were able to return to their homes. Carbon monoxide detectors are in every unit, residents said, but only some heard alarms go off before the evacuation began.

Tyler Johnson, a 24-year-old teacher who lives on the 10th floor, and a friend were on their way to watch the University of Maryland football game when the incident occurred.

“No alarms went off on our floor, but we saw two people in the elevator who said everyone was evacuating the building,” Johnson said. He tried to take his mind off the situation by headed to a bar to watch the Terps play Florida State but left before his team was shutout, 63-0.

Johnson shook his head.

“It hasn’t been a great day,” he said.