President Biden pardoned his son Hunter Biden on Sunday, wiping away his criminal convictions on tax and gun charges despite saying earlier this year he wouldn’t grant such a reprieve.

Biden’s pardon, a decision he said he made over the Thanksgiving weekend, came as his son was set to appear for sentencing hearings later this month in Delaware and California, where he faced the potential of lengthy prison terms .

In a statement, the president said it was clear that his son had been “treated differently” by the Justice Department and “singled out only because he is my son—and that is wrong.”

“There has been an effort to break Hunter—who has been five and a half years sober, even in the face of unrelenting attacks and selective prosecution,” Biden said. “In trying to break Hunter, they’ve tried to break me—and there’s no reason to believe it will stop here. Enough is enough.”

The president’s pardon of Hunter was particularly broad, covering offenses “which he has committed or may have committed or taken part in” dating back to the beginning of 2014. That year, the younger Biden joined the board of Burisma, a Ukrainian gas company that has figured prominently in investigations of his past business dealings.

The pardon drew immediate condemnation from Republicans. “President Biden and his family continue to do everything they can to avoid accountability,” Rep. James Comer (R., Ky.), chairman of the House Oversight Committee, said in a social-media post .

Some Democrats also expressed concerns, including Colorado Gov. Jared Polis , who said the president “put his family ahead of the country” and set “a bad precedent that could be abused by later Presidents.”

Rep. Greg Stanton (D., Ariz.) said, “I respect President Biden, but I think he got this one wrong. This wasn’t a politically motivated prosecution. Hunter committed felonies, and was convicted by a jury of his peers.”

The announcement comes as Democratic lawmakers are returning to Congress this week, hoping to keep public attention focused on some of President-elect Donald Trump ’s controversial choices for administration posts, including loyalist Kash Patel to run the Federal Bureau of Investigation.

Democrats have long warned that Trump would politicize the Justice Department, but the pardon risks undermining that message, providing fodder to argue both political parties are willing to interfere with the justice system when it suits their needs.

Trump in a social-media post called the pardon “an abuse and miscarriage of Justice.” He, too, came under fire for pardons he issued in his first term, including to political allies Steve Bannon , Roger Stone , Paul Manafort and Michael Flynn .

In Delaware, Hunter Biden, 54 years old, was found guilty earlier this year on charges he lied about his drug use on a federal form he completed as part of a 2018 gun purchase. Three months later, just as his trial on tax charges was set to begin in Los Angeles, he pleaded guilty to the offenses , in a surprise move that headed off a legal proceeding that was set to feature evidence of the president’s son spending lavishly while failing to pay what he owed to the government.

Prosecutors said Hunter Biden evaded taxes by claiming hundreds of thousands of dollars in false deductions, including writing off payments for escorts and dancers, a sex-club membership and his daughter’s law-school tuition as business expenses. The president’s son filed these tax papers after he had become sober, prosecutors said.

The younger Biden said he has “admitted and taken responsibility for my mistakes during the darkest days of my addiction—mistakes that have been exploited to publicly humiliate and shame me and my family for political sport.”

“I will never take the clemency I have been given today for granted and will devote the life I have rebuilt to helping those who are still sick and suffering,” he said.

For the elder Biden, the pardon represents a remarkable about-face, albeit one even current and former aides expected in the waning weeks of his White House tenure.

Hunter Biden spent Thanksgiving with his father in Nantucket, where the two were seen lunching together and walking through the Massachusetts island’s downtown. On Saturday evening, Biden attended Catholic Mass with Hunter and the president’s daughter, Ashley, along with Hunter’s young son, Beau. Hunter Biden returned to Washington aboard Air Force One on Saturday night.

The president said that once he made the pardon decision over the weekend, “there was no sense in delaying it further. I hope Americans will understand why a father and a President would come to this decision.”

Biden and his advisers had repeatedly said that Hunter wouldn’t receive a pardon. In June, when a jury found his son guilty in the gun case, Biden said he wouldn’t pardon him. Last month , with Hunter’s sentencing hearings drawing near, White House press secretary Karine Jean-Pierre dismissed an inquiry about whether a pardon was coming. “Our answer stands, which is no,” she said. And last week, White House spokesman Andrew Bates referred reporters to Biden’s earlier statements that he wouldn’t pardon his son.

Last year, Hunter Biden’s legal problems appeared close to a resolution. He had been set to plead guilty to a pair of misdemeanor tax charges and avoid prosecution related to the gun purchase. But the plea deal disintegrated in stunning fashion as his defense lawyers and prosecutors disagreed over the extent of the immunity Biden would receive from potential future charges.

Republican lawmakers, who for years had mounted their own investigations into Hunter Biden, bashed the plea agreement as a sweetheart deal, in part because it would have allowed the president’s son to avoid a felony conviction.

In his statement Sunday, the president highlighted how the plea agreement collapsed in a charged political climate, “with a number of my political opponents in Congress taking credit for bringing political pressure on the process.”

“Had the plea deal held, it would have been a fair, reasonable resolution of Hunter’s cases,” the president said.

Instead, Hunter Biden went to trial on the gun charges in a proceeding that cast a spotlight on the turmoil his drug addiction caused his family. First lady Jill Biden and other family members sat through much of the trial, watching from the first row as prosecutors questioned witnesses and played Hunter Biden’s narration of his memoir recounting his struggles with drugs and alcohol.

Among the family members who testified was Hallie Biden , the widow of Hunter Biden’s brother Beau, who had a romantic relationship with Hunter Biden following her late husband’s death from brain cancer. In wrenching testimony , she recalled finding remnants of crack cocaine and a revolver in Hunter Biden’s truck in October 2018.