After an eleventh-hour plea followed by hours of legal wrangling Thursday, Hunter Biden pleaded guilty to nine tax-related charges, avoiding a lengthy and potentially embarrassing trial for President Joe Biden's son.
U.S. District Judge Mark Scarsi accepted Hunter Biden's guilty plea on all the tax-related charges he faced after being indicted last December. Sentencing in the case is scheduled for Dec. 16.
Judge Scarsi said the younger Biden faces a maximum sentence of 17 years in prison and a fine of as much as $1.35 million.
MORE: Judge rejects latest attempt by Hunter Biden to dismiss tax-related charges"Do you agree that you committed every element of every crime alleged ... in the indictment?" Judge Scarsi asked him.
"Yes," Hunter Biden said before pleading guilty to each count of the indictment.
It was perhaps the most stunning twist in a legal drama that has for years been defined by unexpected turns -- and immediately raised the possibility of a presidential pardon, despite President Biden's previous assurance that he would not grant his son clemency.
Prosecutors accused Hunter Biden in December of engaging in a four-year scheme to avoid paying $1.4 million in taxes while spending hundreds of thousands of dollars on exotic cars, clothing, escorts, drugs and luxury hotels.
Hunter Biden had originally pleaded not guilty to a nine-count indictment that included six misdemeanor charges of failure to pay, plus a felony tax evasion charge and two felony charges of filing false returns.
But on Thursday, just moments before prospective jurors were to be summoned into the Los Angeles courtroom where his trial was scheduled to begin, Abbe Lowell, an attorney for Hunter Biden, announced his intention to submit a so-called "Alford plea," which would allow Hunter Biden to plead guilty on all counts but preclude him from acknowledging guilt on the underlying conduct.
When prosecutors opposed that path -- and Judge Scarsi expressed some hesitation in granting it -- attorneys for Hunter Biden said he would enter a traditional guilty plea.
"Mr. Biden is prepared to proceed today and finish this," Lowell said Thursday afternoon in court.
In pleading guilty to the tax charges, Hunter Biden managed to avoid what was expected to be a grueling and potentially embarrassing weekslong trial, during which prosecutors had planned to examine interludes from his time as a drug addict and his overseas business ventures.
Attorneys in special counsel David Weiss' office had planned to introduce more than two dozen witnesses, including Hunter Biden's ex-wife and her sister.
MORE: Timeline: Hunter Biden under legal, political scrutinyDressed in a dark suit and thick-rimmed glasses, Hunter Biden on Thursday addressed the court to acknowledge that he understood the potential consequences of a guilty plea. His voice showed little emotion and he occasionally glanced into the gallery, where his wife, Melissa Cohen Biden, was seated.
Prosecutor Leo Wise, who earlier in the day called the Alford plea proposal "an injustice," then read the entire 56-page indictment aloud in court to establish a factual record, after which Hunter Biden entered his guilty plea.
Speaking outside court after the hearing, Lowell told reporters that Hunter Biden decided to plead guilty to protect his loved ones.
"After watching prosecutors exploit his family's pain during the Delaware trial and realizing they were planning to do it again here in California, Hunter decided to enter this plea to protect those he loves from unnecessary hurt and cruel humiliation," Lowell said.
Lowell criticized the government's case -- arguing it would have led to a "kind of show trial" and equating it to the millions of Americans who file their taxes late -- and said that Hunter Biden was "keeping open" his options for appeal.
"Hunter put his family first today, and it was a grave and loving thing for him to do," Lowell said.
Lowell refused to answer questions from ABC News' Zohreen Shah regarding whether Hunter Biden had spoken to his father about a pardon.
President Biden ruled out a pardon for his son in June, during an interview with ABC News' David Muir. The president subsequently decided not to seek reelection, which could potentially minimize the political fallout of an about-face.
In their 56-page indictment, prosecutors alleged that Hunter Biden willfully avoided paying taxes by subverting his company's own payroll system, that he failed to pay his taxes on time despite having the money to do so, and that he included false information in his 2018 tax returns.
"[T]he defendant spent this money on drugs, escorts and girlfriends, luxury hotels and rental properties, exotic cars, clothing, and other items of a personal nature, in short, everything but his taxes," the indictment alleged.
Prosecutors also highlighted millions of dollars that Hunter Biden received from overseas business in Ukraine, China, and Romania in exchange for "almost no work."
Although Hunter Biden eventually paid back all his back taxes and penalties with the help of a third party -- identified by ABC News as Hunter Biden confidant Kevin Morris -- Judge Scarsi blocked defense attorneys from introducing that information to a jury.
"Evidence of late payment here is irrelevant to Mr. Biden's state of mind at the time he allegedly committed the charged crimes," Scarsi wrote in an order last week.
In a statement issued following the hearing, Hunter Biden said, in part, "I went to trial in Delaware not realizing the anguish it would cause my family, and I will not put them through it again. ... For all I have put them through over the years, I can spare them this, and so I have decided to plead guilty."
"I have been clean and sober for more than five years now because I have had the love and support of my family," his statement said. "I can never repay them for showing up for me and helping me through my worst moments. But I can protect them from being publicly humiliated for my failures."
Last June, Hunter Biden agreed to plead guilty to two misdemeanor offenses, acknowledging that he failed to pay taxes on income he received in 2017 and 2018. The deal also allowed him to enter into a pretrial diversion agreement to avoid criminal charges related to his 2018 firearm purchase.
Had the deal worked out, Hunter Biden would have likely faced probation for the tax offenses and had his gun charge dropped if he adhered to the terms of his diversion agreement.
However, the plea deal fell apart during a contentious hearing before U.S. District Judge Maryellen Noreika, who took issue with the structure of the deal.
By September, the special counsel had unsealed an indictment in Delaware charging Hunter Biden for lying on a federal form when he purchased a firearm in 2018. The federal indictment in Los Angeles for the tax crimes followed in December.
Hunter Biden was subsequently convicted by a Delaware jury on three felony charges related to his purchase of a firearm in 2018 while allegedly addicted to drugs. His sentencing in that case is scheduled for Nov. 13.
-ABC News' Olivia Rubin contributed to this report.