Close to 1,500 guests were forced out of the 22-story Carousel Hotel in Ocean City, Md., for six hours until 4 a.m. yesterday as toxic and highly flammable fumes threatened to ignite. About 10 persons reportedly were treated for inhalation of vapors by paramedics at the scene or at area medical facilities, but there were no serious injuries.

State Fire Marshal Rocco Gabriele said his investigators reported "extremely dangerous" conditions as flammable xylene from a painting project reached concentrations of 25 percent of the air in a lobby area.

The vapor, which a guest said smelled like airplane glue, is flammable at concentrations of 1 to 7 percent, Gabriele said, and has a "flash point," at which explosion can occur, of 70 to 100 degrees Fahrenheit.

"All it needed to ignite was any open ignition source: a spark, a match a pilot light," said state fire investigator David Herring. "It's almost incredible that it didn't."

The problems developed after an iceskating rink in the atrium of the 250-room, 180-condominium high-rise was painted Wednesday night.

Herring said the xylene-based paint normally is used outdoors or in open areas. He said cans the paint came in had written warnings to the effect that indoor application required forced-air ventilation and painters would need respirators.

"Apparently they the painters were under the impression it was a water-based paint," Herring said.

Doug Thompson of Fairfax, a guest, said he went to a meeting off the atrium at 7 p.m. and the odor from the painting, which was just getting started, "was strong."

When he emerged from the meeting just after 9, he said, the odor was overpowering. "There was an insurance man running after people literally snatching cigarettes and matches away from them," he said.

The city provided temporary shelter at the Convention Center, where about 400 people were taken by bus. Others took lodging elsewhere or simply waited on the beach or boardwalk while the hotel was ventilated. They were allowed back in shortly before 4 a.m.

Officials at the venerable Carousel, the oldest high-rise in North Ocean City, said no guests would be charged for the night for rooms or condominiums, which average $100. The evacuation will cost the hotel about $25,000, said Stan Kahn, sales and marketing director.

Kahn said the painting was done by an outside contractor and that both painters were examined by doctors yesterday and had no physical problems.