The Treasury Department on Friday announced the departure of IRS Commissioner Charles Rettig, an appointee of former President Trump whose term is set to end in mid-November.

Before Congress approves a new permanent IRS head, the agency will be headed by deputy commissioner Douglas O’Donnell as acting chief, the Treasury said.

“I want to thank Commissioner Rettig for his tireless service to the American people across two administrations, and his leadership of the IRS during the difficult and unique challenges posed by COVID-19. I am grateful to him for his partnership and efforts to ensure taxpayers had the resources they needed to make it through the pandemic,” Treasury Secretary Janet Yellen said in a statement.

Rettig’s departure comes as the IRS was just awarded $80 billion over the next 10 years to go after tax cheats and modernize the agency. The funding, included in a Democratic spending package, has sparked a political fight with Republicans, who say their first bill if they win back the House majority will repeal the measure.

It would, however, be difficult to repeal the funding with a Democratic administration in the White House at least until 2024.

Rettig led the IRS as it dealt with the coronavirus pandemic and had to become the primary agency responsible for administering pandemic-related aid to American taxpayers.

This included numerous rounds of stimulus checks sent out directly to Americans, a huge administrative undertaking noted by policymakers of varying ideological stripes. It also included significant adjustments to tax credits that improved child poverty conditions in the US.

Rettig also led the agency as it dealt with accusations of politicization from both the left and the right. Democrats were angry that Rettig never released Trump’s tax returns, which are still being sought by the Democratic-led House Ways and Means Committee and could be delivered as soon as next week if the Supreme Court doesn’t intervene.

Democrats were also mad about the special type of intensive audits given to two former top FBI officials who became political enemies of Trump after they left office. They said that it was statistically highly suspicious that both officials should have received the audits and that it looked a lot like punishment for disloyalty.

Rep. Bill Pascrell (D-N.J.), a member of the House Ways and Means Committee, had called for Rettig’s resignation in light of the audits.

“We are closer to the dawn of a new day at the IRS,” he said in a Friday statement. “The Biden administration is right to end the term of Donald Trump’s IRS commissioner. Under Mr. Rettig’s failed leadership the agency and its dedicated employees have suffered through scandal and incompetence. Americans are fed up with late refunds, unanswered calls, and a two-tier tax system.”

Republicans, meanwhile, were mad about a leak of tax returns belonging to some of the wealthiest people in America, including Elon Musk, Jeff Bezos and Warren Buffett, showing they don’t have to pay very much in taxes.

Republicans were also unhappy about the destruction of paper-filed tax returns in 2021.

“We write to request that you preserve all documents and communications in your custody relating to the Internal Revenue Service (IRS) decision memorandum detailing the recommendation to destroy 30 million unprocessed, paper-filed informational returns around March 2021,” top Ways and Means Republican Kevin Brady (Texas) wrote to Rettig in a letter earlier in October.

“The decision to destroy information returns diligently prepared by millions of American taxpayers is ripe for congressional oversight,” Brady added. 

Rettig’s departure, which was anticipated by many in the tax world, means he won’t be a part of the agency’s next phase, which Yellen described Friday as “a critical period of modernization” — and which Republicans have vowed not to let happen. 

The $80 billion given to the IRS in Democrats’ Inflation Reduction Act will go toward increased enforcement activities such as audits and new technology as well as a beefing up of day-to-day operations as the agency deals with a backlog of millions of tax returns and unanswered phone calls initially caused by the pandemic.

“The passage of $80 billion in IRS funding over the next decade by congressional Democrats will allow the agency to answer the phones and collect what is owed by the wealthiest tax cheats to our great country,” Pascrell said in a statement on Friday.

Republicans have been furious at the prospect of increased tax enforcement, saying the additional funding will target middle-class Americans.

In August, Sen. Ted Cruz (R-Texas) said new revenue agents at the IRS “are not being created to audit billionaires or giant corporations. They’re being created to audit you. The House Ways and Means Committee, the minority, has put out an estimate that under this bill, there will be 1.2 million new audits per year, with over 700,000 of those new audits falling on taxpayers making $75,000 or less. I believe personally we should abolish the IRS.”

Treasury described O’Donnell, the new acting IRS commissioner, as “a career IRS employee, having spent more than 36 years at the agency in a variety of roles.” 

Before becoming deputy commissioner for services and enforcement, he served as the commissioner of the IRS large business and international division for about six years.

Updated at 6:44 p.m.