A criminal case that had raged for more than two years against an alleged Libyan arms dealer came to an abrupt end on Monday after a federal judge ordered the Obama administration to produce documents related to the "covert transfers of weapons" to rebels in Libya between 2010 and 2011.

The charges against Marc Turi, a defense contractor operating a company called the Turi Defense Group, had threatened to expose the administration's alleged direct involvement in providing weapons to Libyan rebels fighting against Moammar Gadhafi, the former leader of Libya who was ousted in 2011 with the help of the U.S. military.

Turi was indicted in Feb. 2014 for illegally providing "a substantial quantity of weapons" to Libyan rebels despite "knowledge that such activities were prohibited by United States law," court documents show. The defense contractor argued that the government was aware of and complicit in the sale of arms to rebel groups — some of which may have ended up in Syria.

Jean-Jacques Cabou, an attorney for Turi, did not immediately respond to a request for comment. Cabou and Turi had declined to speak with the Washington Examiner in July 2015, citing the pending nature of the case, at a time when their legal team was fighting the administration to justify its refusal to release or even describe classified evidence it had compiled against Turi.

At a status hearing held on Sept. 8 in the District Court of Arizona where the case was heard, a judge ordered the administration to produce documents related to its arming of Libyan rebels by Wednesday.

Rather than hand over the records — which could have renewed scrutiny of Hillary Clinton's involvement in a conflict widely viewed as a foreign policy failure — the administration chose to dismiss all charges against Turi. A deal concluding the case was reached in court officially on Tuesday.

The end of the Turi case was first reported by Politico.

Turi's legal woes had drawn attention given lingering questions about the U.S. presence in Benghazi, where a temporary diplomatic compound was attacked by Ansar al-Sharia militants in 2012.

Pentagon documents obtained by conservative-leaning Judicial Watch last year indicate the administration was aware of the movement of weapons between Benghazi and Syria, although the arms were described as leftovers from the military stockpile overseen by Gadhafi.

Conspiracy theorists have long hypothesized that the U.S. government was operating a secret gun-running operation out of Benghazi. More than a half-dozen congressional investigations have failed to find evidence of any covert arms sales in the area at the time of the attack.

Weapons given to the anti-Gadhafi rebels in 2011 are reported to have come in shipments from Qatar and the United Arab Emirates that were tacitly approved by the Obama administration.

However, the U.S. raised concerns after receiving intelligence that weapons meant to arm the Libyan uprising were steadily ending up in the hands of Islamic extremists in the region.

When the U.S. government first brought charges against Turi, government lawyers accused him of attempting to funnel weapons to Libya by "falsely listing Qatar and United Arab Emirates as the end users for weapons that were actually intended for individuals in Libya."

In his defense, Turi argued the arrangement involving weapons transfers from Qatar and the United Arab Emirates to Libya was intentional and encouraged by the administration in order to keep the U.S. from directly supplying arms to rebel groups not yet recognized by the international community.

In Aug. 2014, Turi's defense team gave the court emails between Turi and Ambassador Chris Stevens, one of four Americans killed in the 2012 Benghazi attack, that showed Turi had informed Stevens of the government's pending request to supply weapons in the region.

Clinton has weathered criticism of her advocacy for U.S. military intervention in Libya, something she has tried to downplay on the campaign trail.

During the first Democratic primary debate in October of last year, Clinton downplayed her role in leading the Western charge into Libya by claiming "our closest allies in Europe" were "begging us to help them" topple Gadhafi to ward off a potential human rights crisis.

But the public record makes clear that it was Clinton who rallied the administration and other countries to form the coalition that peppered Libya with airstrikes during its civil conflict.

An upcoming trial in the Turi case was set to drag Clinton's private email server into the conversation about her alleged role in pushing weapons that wound up in Syria. By dropping the charges against Turi, the administration has avoided a requirement to disclose details about the arming of Libyan rebels during Clinton's diplomatic tenure.