SAN FRANCISCO (AP) _ San Francisco had only a few hours to live as April 18, 1906, began and the pleasure-loving city of hills prepared a glittering welcome for the planned debut of the Fairmont Hotel atop Nob Hill.

But the opening had to wait a year, because the Fairmont was among the 28,000 buildings destroyed by fire following the great earthquake that struck at 5:12 a.m., devastating the city.

The hotel, usually a staid, conservative presence among San Francisco hostelries, is letting down its hair for Saturday's 80th birthday party.

It is charging $49 a head for a ''Shake, Rattle and Roll'' charity dance party in the huge Grand Ballroom.

Rooms that have been home away from home for royalty, presidents and luminaries from the arts and letters, have been reduced to $80 a night, $100 off the usual rate.

At the same time, participants will be treated to birthday cake, popcorn, candy, balloons, movies, kazoos, and a chance to rub shoulders with cast members of the television series, ''Hotel,'' which uses the Fairmont as a backdrop.

In the middle of the lobby sits a 3-foot-tall, 4- by 5-foot ''cake'' carved in chocolate.

'We're having a high-energy event, like the earthquake,'' said hotel spokesman Russ Alley. ''The lady is 80.''

In 1907, its charred insides restored, the Fairmont opened to a full house a year to the day after the temblor and quickly won a reputation as one of the world's finest hotels.

Such notables as Presidents Theodore Roosevelt, William Howard Taft, Dwight Eisenhower, Lyndon Johnson and John F. Kennedy, the kings of Sweden and Jordan and the queens of the Netherlands and Denmark have stayed at the Fairmont.

The celebration of its 80 years has been going on all month.

The Crown Room, which offers high-level, 360-degree views of the city and the arch-rival Mark Hopkins Hotel across the street, has been jumping with nightly birthday parties.

The hotel has mounted 80 10-foot-tall candles, floodlit at night, in decorator frosting along the cornice of the hotel, giving it the appearance from a distance of an outsized birthday cake.

Alley said $500-a-candle corporate and private donations have been made, with proceeds destined for charity.

All month the hotel has soliciting old and new toys and books to be given out by the city's Christmas Toys for Tots program.