A former FBI informant accused of fabricating a claim that President Joe Biden and his son Hunter were each paid a $5 million bribe by a Ukrainian oligarch has agreed to plead guilty to a range of federal charges, according to a court filing Thursday.

Alexander Smirnov, a profiteer, fixer and gossip based in Las Vegas, reached a deal with David C. Weiss, the special counsel overseeing the investigation into Hunter Biden, that could lead to 48 to 72 months in prison, according to the filing in federal court in California.

Under the terms of the agreement, Smirnov agreed to plead guilty to creating a false record in a federal investigation, obstructing justice, and failing to pay taxes and penalties on $2.1 million in income for 2020 through 2022.

He is also required to pay $675,502 in restitution, according to the filing.

The plea deal effectively ends the work of Weiss, whom Donald Trump appointed as a U.S. attorney in Delaware during his first term. A federal judge could review the deal as soon as Monday.

By admitting to felonies, Smirnov, who stored more than a half-dozen firearms at his luxurious apartment off the Vegas strip, will no longer be able to legally own a gun.

For more than a decade, Smirnov played a double game, giving the FBI tantalizing and, at times, valuable intelligence about a rogues’ gallery of oligarchs and public officials while offering himself as a consultant, with a fuzzy skill set, to some of the same people he was keeping tabs on.

But his charm, confidence and daring finally caught up with him in 2020 when he told his FBI handler what prosecutors say was a brazen lie — that the oligarch owner of Ukrainian energy company Burisma had arranged to pay $5 million bribes to both Joe Biden and his son.

The explosive claim was leaked to Republicans, who made Smirnov’s allegations a centerpiece of their now-stalled effort to impeach Biden, apparently without verifying the allegation. Many of the politicians who highlighted his fake allegations have remained silent about his indictment.

Smirnov was accused of falsely telling the FBI that Hunter Biden, then a paid board member of Burisma, had demanded the money to protect the company from an investigation by the country’s prosecutor general at the time.

Smirnov’s motivation for lying, prosecutors wrote, appears to have been political. During the 2020 campaign, he sent his FBI handler “a series of messages expressing bias” against Joe Biden, including texts, replete with typos and misspellings, boasting that he had information that would put him in jail.

At the time he was arrested, Smirnov, 43, was preparing to leave for what prosecutors called “a monthslong, multicountry foreign trip” during which he claimed to have plans to meet with contacts from multiple foreign intelligence agencies.

Prosecutors argued in court that his arrest and detention were necessary because Smirnov was “actively peddling new lies that could impact U.S. elections after meeting with Russian intelligence officials in November.”

In a memo arguing for his indefinite detention, deputies to Weiss described him as a hall-of-mirrors fabulist. He not only fed the FBI bogus information about the Bidens and misled prosecutors about his wealth, estimated at $6 million, but he also told officials there that he worked in the security business, even though the government could find no proof that was true.

He was initially held in Las Vegas and later transferred to California, and was scheduled to face trial in January before the same judge who presided over Hunter Biden’s case.

Smirnov’s lawyer did not immediately respond to a request for comment.

Weeks earlier, Weiss charged Smirnov with tax evasion after his indictment in February on charges that he lied to investigators about the Bidens.

Smirnov — who was born in the former Soviet Union and became a U.S. citizen in 2015 — received millions in consulting fees from various sources without reporting the income, prosecutors found when they began digging into his bank records.

He used the cash to subsidize a lavish lifestyle with his live-in girlfriend, spending $1.4 million on his Vegas condominium, running up $400,000 in credit card debt and paying $122,000 for a Bentley, according to court documents.

He was so brazen about dodging taxes that he even claimed — falsely — that he was eligible for the coronavirus pandemic rebate for people earning less than $80,000 a year, prosecutors said.