Two nightclub tragedies in which 117 people were trampled or burned to death in the span of a week have cities across the nation rewriting old fire and building codes and demanding immediate inspections to head off more disasters.

Less than a day after a band's pyrotechnics turned a small Rhode Island club into a raging inferno that killed nearly a third of the crowd, the governor of neighboring Massachusetts mobilized a task force to begin immediate, unannounced inspections of every nightclub in the state.

In the country music capital, Nashville, officials also began spot checks to confirm that all nightclubs had unlocked exits and that those using fireworks had fire inspectors to supervise their use. And in the District, Mayor Anthony A. Williams told aides to inspect clubs and meet with owners to ensure their properties meet building codes.

Just days before the Rhode Island blaze, officials in Chicago were discussing requiring clubs to install panic bars, the push bars commonly found on movie theater doors, following a deadly stampede early Monday at the city's E2 nightclub.

A security guard on the E2 dance floor had shot pepper spray into the crowd to break up a fight, sending hundreds of patrons in a frantic rush for the exit that crushed 21 people to death on a narrow staircase.

Tragedies such as the Chicago stampede and Thursday night's fire at the Station in West Warwick, R.I., often spur quick criticism of security and fire code changes.

In 1995, the state of Maine began regulating indoor pyrotechnics after several people were injured when a "flash pot" exploded at Portland's T-Birds nightclub.

Los Angeles, which has thousands of clubs, hotels and restaurants, has never had a deadly nightclub fire, but it has learned from disasters elsewhere, fire department spokesman Brian Humphrey said.

After a 1942 blaze in Boston killed nearly 500 people trapped inside the Cocoanut Grove club, city leaders in Los Angeles passed a law requiring panic bars on nightclub doors. The city now has one of the strictest fire safety codes in the world.

Nightspots in the Detroit suburb of Royal Oak, Mich., are now required to notify customers of the way to every exit before any show, by order of the city fire marshal.

Pittsburgh law requires that the city be officially informed before any open flame -- even as small as an actor's cigarette -- can be allowed onstage. A city fire inspector also has to be backstage, armed with a radio and a fire extinguisher.