The probe was overseen by U.S. Attorney for Delaware David Weiss, who was appointed by former President Donald Trump and was permitted to stay in his post after Joe Biden took office in order to complete the investigation of the president’s son. The White House and the Justice Department have said they did not interfere with Weiss’ investigation.

“It is my understanding that the five-year investigation into Hunter is resolved,” Hunter Biden’s attorney Christopher Clark said in a statement. “I know Hunter believes it is important to take responsibility for these mistakes he made during a period of turmoil and addiction in his life. He looks forward to continuing his recovery and moving forward.”

The plea agreement is intended to be a comprehensive resolution of Hunter Biden’s potential legal liability in all matters investigated by federal authorities, a person familiar with the negotiations said. Those matters include allegations Republicans have leveled in recent years that his business dealings and his well-compensated post on the board of Ukrainian energy company Burisma amounted to corruption or violated the Foreign Agents Registration Act.

“This is the end of it,” the person involved said, speaking on condition of anonymity to discuss the private legal discussions.

Weiss’s office confirmed some details of the agreement in a press release that added, without elaborating: “The investigation is ongoing.” It was not immediately clear what parts of the inquiry are continuing, but prosecutors could look at potential crimes or civil liability on the part of others who have come under scrutiny in the probe.

The criminal charges against Hunter Biden are sure to be unwelcome for the president, as they would likely be for any parent, although how much political damage they will do to his re-election bid remains unclear.

Hunter Biden’s friends and allies have often chalked up any unwise behavior on his part to his long, publicly-acknowledged battle with drug addiction. That issue appears to have been a factor in the structuring of the deal allowing the president’s son to take advantage of a so-called diversion program to avoid a felony record.

During the investigation, Hunter Biden reportedly paid off his tax debts by tapping more than $2 million he was loaned by a Hollywood attorney and producer, Kevin Morris. Morris is also said to be funding a movie about Hunter Biden based in part on his 2021 memoir, “Beautiful Things.”

Hunter Biden said in an interview that year connected to the book’s release that he was confident the probe would not lead to charges.

“I am cooperating completely and am absolutely certain — 100 percent certain — that at the end of the investigation that I will be cleared of any wrongdoing,” he told CBS.

A POLITICO article in 2021 detailed the bizarre episode that led to the gun aspect of the probe.

In 2018, the wife of Hunter Biden’s late brother Beau allegedly found Hunter’s .38-caliber Colt revolver in his truck, disposed of it in a trash receptacle behind a Delaware grocery store and later returned to retrieve it, only to find it missing, according to a police report. Hunter Biden was in a romantic relationship with her at the time.

The Delaware State Police investigated out of concern that the missing gun could be used in a crime, but a man who regularly rummaged in the trash returned the weapon to authorities a few days later.

Secret Service agents visited the gun store where Hunter Biden bought the weapon and asked for the purchase records, but the owner declined to provide them, saying the matter was under the jurisdiction of the Bureau of Alcohol, Tobacco, Firearms and Explosives, according to two people who spoke to POLITICO for the 2021 article. The Secret Service has said it has no records of any involvement in the incident. The owner later cooperated with ATF agents.

Some of Hunter Biden’s legal woes stemmed from evidence that emerged as the investigation into the gun incident progressed: He responded “no” to a question on the background-check questionnaire that asks, “Are you an unlawful user of, or addicted to, marijuana or any depressant, stimulant, narcotic drug, or any other controlled substance?” Five years earlier, he had been discharged from the Navy Reserve after testing positive for cocaine. In his book, Hunter Biden candidly acknowledged his history of drug use and his family’s repeated efforts to get him into treatment.

Lying on the gun-purchase form can be a felony, though prosecutions for it are rare. It’s unclear how many of those cases involve lying about being a drug user, but prosecutors and defense attorneys say they’re infrequent and are almost always brought in connection with some other set of alleged crimes.

Under the agreement outlined in court filings Tuesday, Hunter Biden will not face a charge of lying on the form and was instead charged with possession of a firearm while “an unlawful user of or addicted to any controlled substance,” which carries a potential prison term of up to 10 years.

Under the plea agreement, he will plead guilty to the two misdemeanors covering his failure to pay his federal taxes from 2017 and 2018, but will not be required to plead guilty to the gun charge. Instead, the charge will remain pending while he proceeds through the diversion program. If he complies with the terms of that program, prosecutors will drop the charge.

While the gun episode and the tax issues have drawn the most attention from prosecutors, Republicans have been focused for years on other aspects of Hunter Biden’s activities, including his business dealings in Ukraine and evidence on a laptop he allegedly abandoned at a Delaware repair shop.

Former President Donald Trump has repeatedly called the computer in question “the laptop from hell” and argued that the FBI was failing to investigate Hunter Biden’s activities.

Efforts by Trump, his lawyer Rudy Giuliani and others to try to gin up a Ukrainian investigation into Hunter Biden’s work for Ukrainian gas conglomerate Burisma led to the House’s first impeachment of Trump in 2019. Trump was acquitted by the Senate the following year.

Since Joe Biden’s election in 2020, Republicans have been calling for a special counsel to investigate Hunter Biden, arguing that anyone appointed by his father would have a conflict of interest.

Attorney General Merrick Garland has shown a willingness to appoint such semi-independent prosecutors in high-profile controversies, naming separate special counsels to investigate Joe Biden, Trump and former Vice President Mike Pence in connection with the presence of classified documents at their homes.

However, Garland ignored the requests for a special counsel for Hunter Biden. Instead, Garland opted to allow Weiss, the top federal prosecutor in Delaware, to remain in office to see through the investigation even as nearly all U.S. attorneys appointed by Trump were asked to resign.

Earlier this year, Garland said he’d given Weiss a broad go-ahead to bring any charges he considered appropriate even if that required action outside Delaware.

“The U.S. attorney has been advised that he has full authority to make those referrals you’re talking about or to bring cases in other districts if he needs to do that,” Garland said at a Senate hearing in March. “He has been advised that he should get anything he needs. … I have not heard anything from that office that suggests they are not able to do anything that the U.S. attorney wants them to do.”

As the Hunter Biden deal became public Tuesday, Garland was traveling in Sweden for meetings with European Union justice officials.

Aside from some publicity in connection with the release of his book, Hunter Biden remained largely mum as the federal investigation progressed. However, last December, he added a prominent, Washington-based attorney to his legal team, Abbe Lowell. Lowell — who successfully defended high-profile public figures like former Sen. John Edwards (D-N.C.) and Sen. Bob Menendez (D-N.J.) — joined New York-based former federal prosecutor Christopher Clark, who had represented Hunter Biden on criminal matters for years.

In the wake of the addition, Hunter Biden’s team began taking a more aggressive public posture against his critics, while not taking any direct shots at the prosecutors or investigators.

In February, Lowell asked the Justice Department and Delaware’s attorney general to investigate several people involved in disseminating the alleged contents of the laptop.

The following month, Lowell filed a countersuit on behalf of Hunter Biden against John Paul Mac Isaac, the owner of the defunct Delaware computer store where Biden left his laptop for repair. The countersuit alleged invasion of privacy in response to an ongoing defamation suit that Isaac filed in 2022 against Hunter Biden and various other people and entities, including POLITICO, CNN, Rep. Adam Schiff (D-Calif.) and the Biden presidential campaign committee.

Some targets of Lowell’s complaints and letters said that, after cultivating ambiguity about the issue for years, Hunter Biden was now implicitly acknowledging the authenticity of the laptop and the data extracted from it, but Lowell insisted the president’s son was not doing so.

While Weiss has stayed on overseeing both the Hunter Biden probes and other federal cases in Delaware, the court filings Tuesday show he brought in a pair of hard-charging federal prosecutors from out of state to deal with the potential prosecution of the president’s son: Leo Wise and Derek Hines. Wise and Hines are best known for prosecuting flagrant corruption in a Baltimore Police Department Gun Trace Task Force.

Eight police officers went to prison in connection with the probe, which charged cops with racketeering for robbing residents of money and drugs.

Wise, whose book on the investigation was published in April, also led the prosecution of Gen. James “Hoss” Cartwright for lying to investigators probing leaks about top-secret U.S. efforts to disrupt Iran’s nuclear program. Cartwright pleaded guilty to a false statements charge, but President Barack Obama pardoned the retired 4-star Marine Corps general, who had served as vice chairman of the Joint Chiefs of Staff.

Ben Schreckinger contributed to this report.