Lebanon’s top prosecutor Wednesday ordered all suspects detained in the investigation into the deadly 2020 port blast in Beirut released, a lawyer for two detainees and judicial officials said.

The move by chief prosecutor Ghassan Oweidat is another blow to the investigation, which has stalled for years. The probe has threatened to rattle Lebanon’s ruling elite, which is rife with corruption and mismanagement and has helped push the country into an unprecedented economic meltdown.

The decision came after Judge Tarek Bitar on Monday resumed the investigation into the devastating port blast, following a 13-month halt over legal challenges raised by politicians accused in the probe — including the chief prosecutor.

Bitar in a statement Wednesday said Ouweidat’s decision to release the detainees was "illegal" and said he was committed to completing the investigation. "Judge Ouweidat cannot charge a judge who previously charged him in the port investigation due to conflict of interests," Bitar’s statement read.

Seventeen detainees have been held for years in pre-trial detention after the massive port blast on Aug. 4, 2020. Hundreds of tons of highly explosive ammonium nitrate, a material used in fertilizers, detonated at Beirut Port, killing 218 people, injuring over 6,000 and damaging large parts of the Lebanese capital.

INVESTIGATION INTO BEIRUT'S MASSIVE 2020 PORT EXPLOSION RESUMES FOLLOWING 13-MONTH HALT

Lawyer Sakher El Hachem, who represents former port authority head Hassan Koraytem and a former port official, U.S. citizen Ziad al-Ouf, told The Associated Press that they received confirmation of the decision from the judiciary and that his clients would be released Wednesday.

Beirut port explosion site

The scene of an explosion that hit the seaport of Beirut is shown, on Aug. 5, 2020. Lebanon’s top prosecutor on Jan. 25, 2023, ordered all suspects detained in the deadly 2020 port blast to be released. (AP Photo/Hussein Malla, File)

The judicial officials added that Ouweidat, who defied Bitar’s decision to resume the paralyzed investigation, will press charges against him. They spoke on condition of anonymity because they were not authorized to speak to the press.

The officials added that Ouweidat sent a police officer to Bitar's residence to notify him of the charges and instruct Bitar to visit his office, but the maverick investigator declined to speak with him.

Ouweidat did not immediately respond to calls from the AP seeking comment.

Mody Koraytem, the sister of the former port authority head, said the detainees’ release was long overdue and she claimed that they were all innocent.

COUPLE SLAMMED FOR SEXY PHOTOSHOOT NEAR BEIRUT EXPLOSION SITE

"As port administration there wasn’t anything they could have done about it (the ammonium nitrate)," she said, adding that they did their jobs given that the judiciary cleared the deadly cargo to enter the port.

Some of the detainees had already left prison by late afternoon Wednesday, including former customs chief Badri Daher. "Oweidat did the right legal thing," his lawyer, Celine Atallah, said. Daher was not available for comment.

Judge Bitar is the second investigator to lead the probe into the port blast, and has charged over a dozen senior political, security, port and security officials.

On Monday, Bitar ordered the release of five of 17 detainees in the case and charged eight officials, among them top intelligence officials Maj. Gen. Abbas Ibrahim and Maj. Gen. Tony Saliba, as well as Oweidat.

The judge also summoned at least 14 politicians and judicial, security and customs officials for questioning in February. Senior officials have repeatedly refused to show up for questioning since the start of the probe.

CLICK HERE TO GET THE FOX NEWS APP

Bitar took his post following the removal in February 2021 of Judge Fadi Sawwan over complaints of bias by two Cabinet ministers. If he is also removed, it could be the final blow to the investigation.

Most families of the blast’s victims have endorsed Bitar and called on authorities to allow for a thorough and unobstructed investigation. Some however have lost hope in a domestic probe and have advocated for a U.N.-mandated fact-finding mission.

Lebanon’s political leadership have accused Bitar without evidence of being biased in his investigation, with some demanding his removal.