Government lawyers were facing a Wednesday deadline to produce documents to Turi’s legal team, and the trial was officially set to begin on Election Day, although it likely would have been delayed by protracted disputes about classified information in the case.

A Turi associate asserted that the government dropped the case because the proceedings could have embarrassed Clinton and President Barack Obama by calling attention to the reported role of their administration in supplying weapons that fell into the hands of Islamic extremist militants.

“They don’t want this stuff to come out because it will look really bad for Obama and Clinton just before the election,” said the associate.

In the dismissal motion, prosecutors say “discovery rulings” from U.S. District Court Judge David Campbell contributed to the decision to drop the case. The joint motion asks the judge to accept a confidential agreement to resolve the case through a civil settlement between the State Department and the arms broker.

“Our position from the outset has been that this case never should have been brought and we’re glad it’s over,” said Jean-Jacques Cabou, a Perkins Coie partner serving as court-appointed defense counsel in the case. “Mr Turi didn’t break the law….We’re very glad the charges are being dismissed.”

Under the deal, Turi admits no guilt in the transactions he participated in, but he agreed to refrain from U.S.-regulated arms dealing for four years. A $200,000 civil penalty will be waived if Turi abides by the agreement.

A State Department official confirmed the outlines of the agreement.

“Mr. Turi cooperated with the Department’s Directorate of Defense Trade Controls in its review and proposed administrative settlement of the alleged violations,” said the official, who asked not be named. “Based on a compliance review, DDTC alleged that Mr. Turi…engaged in brokering activities for the proposed transfer of defense articles to Libya, a proscribed destination under [arms trade regulations,] despite the Department’s denial of…requests for the required prior approval of such activities.”

Turi adviser Robert Stryk of the government relations and consulting firm SPG accused the government of trying to scapegoat Turi to cover up Clinton’s mishandling of Libya.

“The U.S. government spent millions of dollars, went all over the world to bankrupt him, and destroyed his life — all to protect Hillary Clinton’s crimes,” he said, alluding to the deadly Sept. 11, 2012 terrorist attack on the U.S. Consulate in Benghazi, Libya.

Republicans hold Clinton responsible for mishandling the circumstances around that attack. And Stryk said that Turi was now weighing book and movie deals to tell his story, and to weigh in on the Benghazi attack.

Representatives of the Justice Department, the White House and Clinton’s presidential campaign either declined to comment or did not respond to requests for comment on the case or the settlement.

Turi was indicted in 2014 on four felony counts: two of arms dealing in violation of the Arms Export Control Act and two of lying to the State Department in official applications. The charges accused Turi of claiming that the weapons involved were destined for Qatar and the United Arab Emirates, when the arms were actually intended to reach Libya.

Turi’s lawyers argued that the shipments were part of a U.S. government-authorized effort to arm Libyan rebels.

It’s unclear if any of the weapons made it to Libya, and there’s no evidence linking weapons provided by the U.S. government to the Benghazi attacks.

“The proposal did not result in an actual transfer of defense articles to Libya,” the State Department official told POLITICO on Tuesday.

But questions about U.S. efforts to arm Libyan rebels have been mounting, since weapons have reportedly made their way from Libya to Syria, where a civil war is raging between the Syrian Government and ISIL-aligned fighters.

In an interview last year, Turi said the U.S. was aware that weapons being shipped into Libya during the unrest there were being immediately diverted to Syria.

"When this equipment landed in Libya, half went one way, and the half went the other way," Turi said in an interview broadcast on Fox Business Channel. "The half that went the other way is the half that ended up in Syria."

Turi also said he came up with an idea he termed "zero footprint," where the U.S. would send weapons to Libyan rebels through Arab countries, like Qatar and the United Arab Emirates.

During 2013 Senate hearings on the 2012 Benghazi attack, Clinton, under questioning from Sen. Rand Paul (R-Kentucky), said she had no knowledge of weapons moving from Libya into Turkey, for ultimate transfer to Syria.

Wikileaks head Julian Assange in July suggested that he had emails proving that Clinton “pushed” the “flows” of weapons “going over to Syria.”

Additionally, Turi’s case had delved into emails sent to and from the controversial private account that Clinton used as Secretary of State, which the defense planned to harness at any trial.

At a court hearing in 2015, Cabou said emails between Clinton and her top aides indicated that efforts to arm the rebels were — at a minimum — under discussion at the highest levels of the government.

“We're entitled to tell the jury, ladies and gentlemen of the jury, the Secretary of State and her highest staff members were actively contemplating providing exactly the type of military assistance that Mr. Turi is here to answer for,” the defense attorney said, according to a transcript.

Turi’s defense was pressing for more documents about the alleged rebel-arming effort and for testimony from officials who worked on the issue for the State Department and the CIA. The defense said it planned to argue that Turi believed he had official permission to work on arms transfers to Libya

“If we armed the rebels, as publicly reported in many, many sources and as we strongly believe happened and as we believe at least one witness told the grand jury, then documents about that process relate to that effort,” Cabou told Campbell at the same hearing last year.