MEXICO CITY — Troops marched in formation across a deserted public plaza in the Mexican capital Wednesday, and military planes rocketed across a clear blue sky to mark the country's independence from Spain.

But while many Mexicans enjoyed the day off, lingering in bars and eateries across the city, the prevailing mood was one of brief escapism from a dark and worrying time, defined by the devastation of a virus that has take more than 71,600 lives and hammered the economy.

"We are proud, but we are angry and sad at the same time," said Laura Santander, 28, a physician who was sipping rum and Cokes with friends at a noisy cafe. "This is our nation's birthday, and normally we love to celebrate and shout and carry on. But we know the pandemic is not going to go away for a long time. It is eclipsing our pride."

The government tried to find a balance between pride and caution. Authorities canceled the traditional late-night gathering Tuesday in the Zócalo, the grand plaza where crowds normally jam together to hear the president reenact the Cry of Dolores, which launched the 1810 uprising that led to independence.

Mexicans were told to stay home and watch on TV as President Andrés Manuel López Obrador performed the Grito above the empty, echoing plaza, cordoned off by masked police and covered with a giant neon map of the country in green, red and white. Some said they were too depressed to tune in.

"There was nothing to celebrate. I didn't even turn it on," said Victor Lozio, 50, who makes tacos and enchiladas at a lunch counter. He said that his uncle had died of covid-19 and that his business has plummeted with so many people out of work. Mexico's economy is expected to contract by 10 percent this year; the country ranks fourth in the world in coronavirus deaths.

By Wednesday afternoon, souvenir vendors were packing up their holiday displays of giant flags, sombreros, guitars — and face masks. After the military parade, which included a moment of silence for the country’s coronavirus dead, the president’s only event was a visit to a hospital to thank health workers for their dedication during the country’s outbreak.

Some commentators said Tuesday night’s display of fireworks and neon around the palace seemed a mockery of public suffering, or that the occasion called for a focus on the victims of covid-19 and a rethinking of public policy priorities.

“Will the empty plaza make us reflect on the gravity of the health crisis?” columnist Fabiola Guarneros Saavedra asked in the newspaper Excelsior. “Will the night invite reflection, a review of the path we want the country to take?”

Others said this year’s quiet observation of the country’s most beloved annual public ritual shouldn’t detract from the gains Mexico has made toward reducing poverty and inequality, expanding democratic participation and rising in international influence.

“It is a strange time, but we have passed through tragic moments before,” said Sergio Aguayo, a political analyst. “Life goes on, even in emergencies. The Grito is not about the palace or the president. It is something we all carry around with us. If we look back 50 years, we can celebrate how lucky we are today, with more freedom, more democracy and a better chance to build our own destiny.”

Still, the worry and weight of the moment here is palpable. At Garibaldi Plaza, where mariachi musicians in spangled uniforms wait to be hired for parties and events, dozens were slumped disconsolately on benches. They said business had fallen by half, due mostly to restrictions on gatherings.

“People want us to play in restaurants and homes, but the government is limiting indoor events,” said Felipe Luna Sosa, a violinist who has been performing for 36 years. “It’s especially hard when people are dying from this virus, and we can’t play at their farewell events.”

Like Sosa, a majority of people on the streets were wearing masks. Hundreds of masked police blocked streets and sidewalks in the government district, and guards stood at the entrances to stores, taking customers’ temperatures and reminding them to stand apart inside. But many people mingled casually at subway stations and in poorer areas with crowded sidewalk bazaars.

“Mexican culture is very touch-oriented, People want to hug and show affection. Now the covid has broken that,” said Raúl Nivón Ramírez, who directs the Regional Museum of Puebla.

In the past, he said, Mexican leaders have used the independence celebration to win political favor. But this time, he said, as the pandemic pushes people apart, “the Grito has to be a call to create unity.”