George Santos, the disgraced former Republican member of Congress from New York whose penchant for lying led to one of the oddest sideshows in modern U.S. politics, pleaded guilty on Monday to wire fraud and aggravated identity theft and admitted to an array of other frauds and deceits.

While Santos’ decision will allow him to avoid a costly trial that was scheduled for next month, it ensures that he will face at least two years in prison.

The plea offers a coda to the tale of a political underdog who catapulted to Congress less than two years ago and then watched his career quickly unravel as his seemingly endless series of falsehoods came to light. Santos repeatedly insisted that he would defend his innocence in court, only to reverse course as the opportunity approached.

The Santos who appeared in court bore little resemblance to the shameless provocateur whose antics once grabbed headlines. His bravado was replaced by an ill-fitting jacket and words of contrition for several scams involving money laundering, making false statements to Congress and fraudulently claiming unemployment benefits.

“I accept full responsibility for my actions,” he told the judge as he admitted to participating in a scheme to “artificially inflate” the number of contributions to his campaign to win support from the National Republican Congressional Committee.

Speaking to reporters outside the courthouse, Santos was more voluble. His voice thick with emotion, he said that his plea was an effort to make amends for misrepresentations to supporters and the government, as well as “the lies I told myself over these past years.”

“I allowed my ambition to cloud my judgment,” he said, “leading me to make decisions that were unethical and — guilty.”

Santos’ sentencing is scheduled for Feb. 7, meaning he will not have to report to prison for at least six months. Guidelines call for him to serve between six and eight years in prison, though a judge could decide to be more lenient.

Santos also agreed to pay a total of $373,749.97 in restitution to a variety of entities, including donors whose credit cards he used without authorization and the state unemployment fund he fraudulently received benefits from. He will be required to forfeit another $205,002.97 before his sentencing.

Democrats immediately seized on the guilty plea to blame Republicans for backing Santos in the first place. But the outcome may also be welcome news to Republicans in New York, where the party is preparing to defend a half-dozen swing seats that could decide the House majority.

The party already lost control of Santos’ seat, representing parts of Queens and Long Island, to Democrats in a special election in February, held after Santos was expelled. But a high-profile trial would have opened an unflattering window into the inner workings of Republican campaigns and cast a shadow over other races.

Santos burst onto the national political scene in 2022 when he flipped New York’s 3rd Congressional District and helped his party win control of the House. At the time, he was heralded as a new kind of Republican. Young, Latino and gay, Santos was a proud adherent of former President Donald Trump who embraced his attention-grabbing style of politics and widely debunked claims of election interference.

But even before he was sworn in, Santos’ lies began to unravel.

Last year, Santos was charged with 23 felony counts for a number of schemes, including stealing money from donors and lying to the government to cover his tracks. He originally pleaded not guilty to the charges.

Despite the legal headwinds, Santos remained in Congress until late last year, when a report from the bipartisan House Ethics Committee revealed that he had not only defrauded donors, but had used the ill-gotten gains to buy designer goods and Botox.

Republicans joined Democrats to expel him from Congress in December, making Santos one of only six members of Congress to be kicked out of office.