President Biden fired the head of the Social Security Administration.

President Biden on Friday fired the man President Donald J. Trump appointed to lead the Social Security Administration, triggering a legal showdown over who rightfully holds the position.

Mr. Biden asked on Friday morning for the resignation of Andrew Saul, the Social Security commissioner, and David Black as deputy commissioner. Mr. Black resigned as requested but Mr. Saul refused to relinquish his position and was notified by the administration that he had been fired. He has vowed to fight Mr. Biden’s move as illegal.

Mr. Biden moved to appoint an acting commissioner, Kilolo Kijakazi, while the administration looks for permanent replacements for the two jobs. Ms. Kijakazi is currently the deputy commissioner for retirement and disability policy at the agency.

The developments were first reported by the Washington Post.

The firing was the latest move by Mr. Biden to oust a Trump-appointed director of an independent executive agency. In June, the president removed the head of the Federal Housing Finance Agency, which oversees mortgage giants Fannie Mae and Freddie Mac, after the Supreme Court ruled that the president had the authority to remove the head of the agency.

Democrats have sought to oust Mr. Saul from his position since the early days of Mr. Biden’s administration. Those calls grew in the wake of the $1.9 trillion stimulus package that Democrats passed in March, which included $1,400 direct payments to individuals. Lawmakers have said Mr. Saul helped to delay payments to retirees by not transmitting necessary files to the Internal Revenue Service.

Mr. Saul’s agency said it did not receive funding to do that work.

Ohio Senator Sherrod Brown, the chairman of the Senate Finance Committee’s Subcommittee on Social Security, Pensions, and Family Policy, called for Mr. Saul’s resignation in February, saying Mr. Saul had sought to issue regulations meant to reduce access to Social Security disability benefits — including denying benefits to an estimated 100,000 potential recipients who do not speak English fluently.

“Social Security is the bedrock of our middle class that Americans earn and count on, and they need a Social Security commissioner who will honor that promise to seniors, survivors, and people with disabilities now and for decades to come,” Mr. Brown said on Friday. “Instead, Andrew Saul tried to systematically dismantle Social Security as we know it from within.”

A White House official, speaking anonymously because he was not authorized to discuss the firing publicly, said the administration believed that Mr. Saul had undermined Social Security’s disability benefits, terminated a telework policy at the agency and alienated federal employee unions over work force safety planning amid the pandemic.

Mr. Saul did not immediately respond to a request for comment.

Republicans seized on the firing, portraying it as a political decision.

“Social Security beneficiaries stand the most to lose from President Biden’s partisan decision to remove Commissioner Andrew Saul from leadership of the Social Security Administration,” said Represenative Kevin Brady of Texas, the top Republican on the Ways and Means Committee, and Senator Mike Crapo of Idaho, the top Republican on the Finance Committee.

“It is disappointing that the administration is injecting politics into the agency, given that Commissioner Saul was confirmed with bipartisan approval, worked closely with both parties in Congress, and provided smooth benefit and service delivery during the largest management challenge ever faced by the agency.”