WASHINGTON - President Obama forced out the head of the IRS on Wednesday, seeking to restore the public's faith in the tax agency while asserting a measure of control over a rapidly growing political problem.

Making a hastily scheduled statement at the White House, Obama denounced the targeting of conservative groups by the Internal Revenue Service as "inexcusable" and pledged to "do everything in my power to make sure nothing like this ever happens again."

"Americans are right to be angry about it, and I am angry about it," he said. "I will not tolerate this kind of behavior in any agency, but especially in the IRS, given the power that it has and the reach that it has into all of our lives."

Steven Miller, a tax lawyer and career IRS official, agreed to resign at the request of Treasury Secretary Jacob J. Lew after coming under fire following revelations that the agency had singled out conservative organizations for special scrutiny. Miller, who has been the acting commissioner since November, will remain at the agency until early June to allow a smooth transition.

Questions mounted about his role this week as it became clear that he had not disclosed the problems to Congress in letters and testimony despite being briefed on it.

Several lawmakers, including Senate Minority Leader Mitch McConnell, R-Ky., and Sen. Marco Rubio, R-Fla., had called for Miller's resignation.

Three congressional committees have scheduled hearings, with Miller set to testify at the first on Friday.

The hearings will build on an audit by a Treasury Department inspector general that found IRS workers in Cincinnati inappropriately flagged conservative organizations, pulling aside applications with keywords such as "tea party" and policy objectives such as "educating on the Constitution and Bill of Rights."

The organizations were seeking recognition as tax-exempt social-welfare groups, which are permitted to do a limited amount of political activity, as long as it is not their primary purpose.

The audit concluded that dozens of advocacy groups were forced to answer exhaustive and intrusive questions about their activities and donors. Their applications languished - some for more than three years. The inspector general blamed poor management and a lack of clarity within the IRS about how much political engagement of such organizations is allowed.

Lawmakers on Wednesday said many questions remained, even after the audit. House Speaker John A. Boehner, R-Ohio, escalated the rhetoric early in the day, telling reporters that his question "isn't about who's going to resign" over the controversy. "My question is, who's going to jail?"

A separate criminal investigation is already underway. Testifying on Capitol Hill, Attorney General Eric Holder said the Justice Department investigation would look at possible civil-rights violations and false statements.

Most important, he said, "If we have to bring criminal actions to make sure this kind of activity does not happen again," the department will do so.

Holder did not say whom the Justice Department was targeting in its investigation.

According to the inspector general's report, Miller became aware that there were potential problems more than a year ago. In late March 2012, amid news reports that tea-party groups were having difficulty getting their applications approved by the IRS, he asked one of his managers to find out what was going on.

On May 3, 2012, Miller learned that the agency had improperly singled out groups that used conservative terms in their paperwork, the IRS said this week.

But six weeks later, in a letter to the chairman of a key House oversight subcommittee, Miller made no mention of the inappropriate handling of the applications. He wrote that after an increase in filings for tax-exempt status in 2010, the agency "took steps to coordinate the handling of the cases to ensure consistency."

Miller noted that some applications had lingered "for a longer time than expected." And he made an allusion to some internal problems, writing that, in early 2012, "issues with respect to these cases were brought to the attention" of top officials who "ensured more timely and consistent handling of the cases."

He continued to defend the IRS process in letters to Congress in June and September 2012, months after staff attorneys had flagged some of the questions as "troubling" and the agency had decided to destroy some donor information.

And in July testimony before a House Ways and Means subcommittee on oversight, Miller fielded questions from lawmakers who said groups in their districts felt they were being harassed by the IRS. He described the process for evaluating social-welfare groups, without mentioning that agents had used inappropriate criteria to screen potentially politically active groups.