Millions of Mexicans crowded the country's cemeteries today for their annual observance of the Day of the Dead, a tradition that acquired special poignancy this year as an occasion to commemorate victims of the devastating Sept. 19 earthquake.

"This is going to be a sad Day of the Dead, a very sad one," Jesus Martinez said as he listened to an outdoor mass on the steps of La Soledad church, one of hundreds of damaged buildings in the downtown Mexico City that have been closed since the earthquake.

"We used to spend the day at the cemetery eating and drinking, but this year it is a time to mourn, not to celebrate," Martinez said.

Coming six weeks after the earthquake and coinciding with the close of the traditional 40-day mourning period, the Mexican ritual of the Day of the Dead should help people here overcome the earthquake's lingering trauma, many psychologists and cultural commentators concurred.

All but 48 of the earthquake's estimated 9,500 dead were residents of the capital. Throughout Mexico City, thousands of Day of the Dead ceremonies were staged privately and publicly beginning late last night and continuing through the day, with events ranging from masses and traditional cemetery visits to rallies and rock concerts. In a manner unusual for Mexico, the special events honoring the earthquake dead were organized not by the government or political parties but by local citizens' groups.

In one ceremony in a park across the street from the ruined General Hospital, where about 400 patients and medical personnel died, thousands gathered quietly at midnight to listen to music, mingle with neighbors and reflect on the disaster.

Candles flickering in paper cups, the only source of light, outlined improvised altars decked with yellow marigolds. In front of the altars were such traditional offerings to the dead as spicy tamales, discreet flasks of tequila and fragrant, smoking pots of copal incense. Displayed alongside were small sugar-candy skulls with the names of the dead inscribed on the foreheads.

"There is an incredible sense of calm here tonight," said one young woman, surveying the scene. "People want to put the earthquake behind them, but they don't want to forget."

Beyond the candle-lit park loomed the cracked towers of the General Hospital complex, illuminated by street lights. A block behind, bulldozers working under floodlights could be seen scraping through the rubble of a quake-damaged apartment house demolished a week ago by American explosives experts.

Three miles away a similar ceremony begun last evening continued today at the vacant foundation of what had been the government-owned Nuevo Leon apartment building, where a residents' association estimated that 750 people were killed when the structure crumbled in the first minute of the earthquake.

"Victims of Corruption," read one wreath placed on the building's ruins, a reference to authorities' apparent neglect of tenant complaints before the quake that the building was cracking and required buttressing.

Thousands, many dressed in mourning, stood at the site this morning for a commemorative mass.

As is customary, Day of the Dead activities started yesterday with All Souls' Day masses and visits to the gravesites of children. Nearly half of the earthquake's victims were minors. Many Mexicans visited family gravesites yesterday to avoid the crowds that today gave city cemeteries something of a county fair atmosphere, complete with food stands and carnival rides flanking the cemetery gates.

Other families, more somberly, spent yesterday visting the unmarked common graves where hundreds of earthquake victims were buried before they could be identified.

"We are looking for my sister," Salvador Salazar said last night as he stood at the lip of one of four open ditches in a desolate corner of the San Lorenzo public cemetery, an arid, windswept field on the city's southeastern edge. Fresh earth mixed with lime covered the bodies below.

"This is not a respectful burial," he said.