WASHINGTON - President Obama picked a senior White House budget official to become acting head of the IRS on Thursday, the same day another top official announced plans to leave the agency amid the controversy over agents targeting tea party groups.

Obama named longtime civil servant Daniel Werfel as acting IRS commissioner. Werfel, 42, serves as controller of the Office of Management and Budget, making him a key player in implementing recent automatic spending cuts known as the sequester.

"Throughout his career working in both Democratic and Republican administrations, Danny has proven an effective leader who serves with professionalism, integrity and skill," Obama said in a statement.

Werfel replaces Steven Miller, who was forced to resign Wednesday amid the growing scandal, though he is still scheduled to testify Friday at a congressional hearing.

Also Thursday, Joseph Grant, one of Miller's top deputies, announced plans to retire June 3, according to an internal IRS memo. Grant is commissioner of the agency's tax exempt and government entities division, which includes the agents who targeted tea party groups for additional scrutiny when they applied for tax-exempt status.

It was not immediately clear whether Grant's retirement was related to the controversy over tea party targeting by the IRS.

Werfel agreed to head the IRS through the end of September, the White House said. Presumably, Obama will nominate a new commissioner by then.

IRS commissioners serve five-year terms and must be confirmed by the Senate. Werfel won't need Senate approval because he is a temporary appointment. The Senate confirmed Werfel for his current position without opposition in 2009.

Werfel has had several jobs at the Office of Management and Budget and worked there during President George W. Bush's administration.