tense calm settled over the Lebanese capital Friday after a day of armed clashes, marking some of the worst violence in years, left seven people dead and raised fears among residents of a wider descent into bloodshed.

Banks, schools, offices and shops were closed in many places as mourners held funerals in several parts of the country.

The day before, explosions and gunfire had plunged the Mediterranean city into chaos. Gunmen first fired on a protest led by Lebanon’s powerful Hezbollah movement. Hezbollah supporters then fired back, setting off an hours-long street battle that evoked memories of the country’s civil war.

Hezbollah and its political allies had called the demonstration to urge the removal of a top judge from an investigation into the massive blast at Beirut’s main port last year. In a statement, Hezbollah and the allied Amal movement said that the violence was carried out “by organized and armed groups” aiming “to drag the country to purposeful disorder.”

But even as the streets quieted Friday, the latest escalation could test what remains of Lebanon’s stability. In recent years, the tiny nation has faced compounding crises, including the pandemic, severe shortages of basic goods and fuel and the erosion of the state’s legitimacy.

WHAT TO KNOW

  • What’s behind the latest violence?
  • How does the violence echo Lebanon’s past?
  • What could happen next?

What’s behind the latest violence?

On Aug. 4, 2020, a powerful explosion of ammonium nitrate stored for years at the port of Beirut tore through the city and killed more than 200 people. It was one of the largest nonnuclear blasts in history, according to experts.

Since then, Lebanese protesters have pushed to hold officials accountable for the destruction — and even forced the resignation of Prime Minister Hassan Diab.

Soon after the explosion, a judicial council appointed Judge Fadi Sawan to investigate the disaster, who implicated senior officials in the improper storage of hazardous chemicals. Documents uncovered in the investigation revealed that the stockpile of some 2,750 tons of ammonium nitrate was no secret among Lebanon’s ruling class.

In 2014, the dangerous cargo was unloaded from an abandoned ship moored at Beirut’s port after suffering leaks at sea. For six years after that, government ministries, private companies and even Lebanon’s Armed Forces allowed the chemicals to languish just a few hundred yards from densely packed neighborhoods at the center of Beirut’s nightlife.

But Sawan’s inquiry quickly faced resistance from powerful officials who accused the judge of political bias. Ministers charged with negligence refused questioning or claimed immunity from prosecution. Sawan was then dropped from the case and replaced by Judge Tarek Bitar, the head of Beirut’s criminal court.

Bitar faced similar obstacles, however, and was met this week with severe backlash after issuing an arrest warrant for former finance minister and Amal politician Ali Hassan Khalil. He charged Khalil and three other former senior government officials with intentional killing and negligence.

Since Tuesday, Hezbollah has demanded that the government take action against Bitar. A pro-Hezbollah minister and other cabinet ministers also threatened to resign if Bitar was not removed. On Wednesday, a court rejected a petition to replace Bitar, a decision that allowed him to resume his investigation.

The next day in Beirut, supporters of Hezbollah and Amal staged demonstrations calling for his removal.

How does the violence echo Lebanon’s past?

Lebanon’s most recent crisis began two years ago when street protests over a proposed tax on Internet calls morphed into wider demonstrations against the ruling elite. State institutions lost legitimacy, the economy floundered and then, as the country’s woes compounded, the pandemic hit and it slid toward collapse.

But underlying all of this are tensions that reach back decades. Lebanon is home to more than a dozen religious sects and in the mid-20th century, Christians and Sunni and Shiite Muslims struck a power-sharing agreement they hoped would underpin the country’s stability.

Under the pact, Lebanon’s president would be Christian, the prime minister Sunni and the speaker of parliament a Shiite. But the agreement started to fray when Palestinian militants, based in Lebanon, began launching attacks against Israel. The violence led to a civil war between 1975 and 1990, a conflict that left more than 100,000 dead and laid the foundation for subsequent crises and endemic corruption.

When the fighting stopped, political spoils were distributed among the warring factions, leading to sporadic outbursts of violence over the years.

In 2008, amid a protracted political stalemate, brief but deadly clashes broke out in Beirut between Hezbollah and the U.S.-backed government. The scenes Thursday in Beirut, however, were especially reminiscent of the civil war era, as bullets streaked across major squares and slammed into buildings, sending people racing for cover.

What could happen next?

Hezbollah has accused the Lebanese Forces, a right-wing Christian movement, of gunning down protesters in Beirut on Thursday, an accusation the group has denied.

Samir Geagea, the group’s leader, fired back at Hezbollah, calling its tactics to pressure Bitar “intimidation.” In remarks this week, Geagea called on people to be ready for peaceful strikes if “the other side” attempted to use force to carry out its will.

The tit-for-tat accusations come as Lebanon faces one of the world’s worst economic crises. The meltdown is contributing to a humanitarian catastrophe, as residents face sweeping blackouts, fuel shortages and runaway inflation that puts many goods out of reach.

As a result, Lebanon’s new government, formed in September, faces steep economic and political challenges and will probably struggle to implement reforms.