BEIRUT (AP) - Scores of protesters Thursday scuffled with riot police in Beirut as they tried to break into the offices of Lebanon's judiciary, after the country's chief prosecutor filed charges against the judge investigating the massive 2020 port explosion and ordered the release of all suspects in the case.

The probe has stalled for years, as it threatens to rattle Lebanon's ruling elite, which is rife with corruption and mismanagement, and has helped push the country into an unprecedented economic meltdown.

Among those released was a U.S. citizen whose detention without trial had drawn threats of sanctions from American officials, and who promptly left Lebanon, circumventing a travel ban.

Port official Ziad Auf, a dual U.S.-Lebanese citizen, was detained three days after the Aug. 4, 2020, explosion of hundreds of tons of highly flammable ammonium nitrate, a material used in fertilizers. The blast killed 218 people, injured over 6,000 and damaged large parts of the Lebanese capital.

U.S. authorities considered Auf as “unlawfully detained” without trial for two years and almost six months, said Nizar Zakka, president of the U.S.-based Hostage Aid Worldwide, which represented Auf. Zakka added that even if Auf was to be charged, he would have been freed as his period in detention amounts to Lebanon's maximum punishment for the charge of negligence that he faced.

American officials threatened Lebanon with sanctions if Auf was not released, Zakka said, noting that a section of the Robert Levinson Hostage Recovery and Hostage-Taking Accountability Act - named after a retired FBI agent who vanished in 2007 and is now presumed dead - authorizes the U.S. president to impose sanctions, including visa revocations, on people believed to be involved in the wrongful detention of Americans.

Straight after his release, Auf was briefly taken to his Beirut apartment to collect some of his belongings before he was escorted by U.S. embassy officials to Beirut's Rafik Hariri International Airport where he boarded a plane out of the country, his daughter Dalia told The Associated Press Thursday.

“The U.S. embassy told us `you need to get on a flight and you have to be discreet, of course, for his condition and for his safety,”' Dalia Auf said in a telephone interview with the AP. She spoke from a country in the Middle East where her father will spend some time to undergo medical checkup before heading back to the U.S.

A U.S. embassy spokesperson declined to comment on the case.

Dalia Auf said her father had no knowledge of the ammonium nitrates that were stored at the port since 2014 until they exploded.

According to documents seen by the AP, Auf had been working at the port for more than 22 years but in January 2020 he was temporarily assigned as a caretaker of the port's safety and security department after the person who was in charge retired. Since Auf had no experience in security and safety issues he raised the matter with the head of the port who allowed him to take three training sessions with a U.S.-based company specialized in port security.

The documents show that on May 28, 2020, members of Lebanon's State Security intelligence agency questioned Auf about the ammonium nitrates stored at the port and he told them that he did not know about the presence of such material.

She added that her father might have to undergo some operations due to medical issues, some of which she said were the result of his detention.

“We want to take him as soon as possible but we want him to be in his best shape in order to take a long flight,” she said.

The release of the port probe detainees drew protests from family members of those killed in the blast. Lebanon's chief prosecutor Ghassan Oweidat ordered the release Wednesday and filed charges against Judge Tarek Bitar, the top investigator in the case.

Lebanon's highest judicial body, the Higher Judicial Council, was scheduled to meet Thursday afternoon to discuss the latest developments in the inquest. Advocates for Bitar, who include many of the families of the blast victims, feared the council would issue a decision to remove the maverick judge from the probe, but the session was canceled due to a lack of quorum. Oweidat was in the building but failed to join the council and stayed in his office guarded by armored security forces, who later escorted him out.

Ahead of the canceled session, several demonstrators were wounded as police pushed the crowds back from outside Beirut's historical Palace of Justice, and beat some people with batons.

Bitar on Monday had resumed the investigation based on his legal interpretation, following a 13-month halt over legal challenges raised by politicians accused in the probe. He also charged over a dozen senior political, judicial, and security officials, including Oweidat.

The recent developments have led to a standoff between the two judges, who each claim the other is breaking the law, crippling the country's judiciary, as its cash-strapped institutions continue to decay.