Scott Pruitt resigned Thursday as head of the Environmental Protection Agency, ending a rocky 15-month tenure after fulfilling a number of top conservative goals while battling myriad scandals over his personal behavior in office.

President Trump announced on Twitter that he had accepted the resignation and praised Mr. Pruitt’s work. He said Deputy Administrator Andrew Wheeler will take over as acting chief on Monday.

Speaking to reporters aboard Air Force One later, Mr. Trump said the decision was Mr. Pruitt‘s, though he acknowledged that the EPA chief had become a distraction.

SEE ALSO: Trump says Scott Pruitt ‘didn’t want to be a distraction’

“He’ll go on to great things, and he’s going to have a wonderful life, I hope,” Mr. Trump said. “But he felt that he did not want to be a distraction for an administration that he has a lot of faith in.”

It was a reversal for Mr. Trump, who stuck with Mr. Pruitt as watchdogs launched more than a dozen investigations into his conduct on the job, including his decision to spend $43,000 on a soundproof phone booth for his office and his requests to EPA staff to help his family obtain jobs.

The president said the decision had been in the works for a couple of days.

“It is extremely difficult for me to cease serving you in this role first because I count it a blessing to be serving you in any capacity, but also, because of the transformative work that is occurring. However, the unrelenting attacks on me personally, my family, are unprecedented and have taken a sizable toll on all of us,” he wrote in his resignation letter to Mr. Trump.

As EPA chief, the former Oklahoma attorney general displayed a zeal for cutting regulations and a commitment to carrying out Mr. Trump’s mandate for the government to stop erecting environmental roadblocks for businesses.

He worked to reverse dozens of Obama-era regulations, such as reining in the EPA’s expanded reach over American waterways and rolling back the Clean Power Plan that sought to impose greenhouse gas caps through executive action.

He also defended major cuts to EPA staffing and overhauled the standards for how the agency used science to back up its decision-making.

The president repeatedly praised him for his work, even as the White House said it was troubled by the constantly emerging reports of scandals.

Democrats were fierce critics throughout Mr. Pruitt’s tenure and were happy to see him go.

“Scott Pruitt was the worst EPA administrator in the history of the agency,” said Sen. Bernard Sanders, Vermont independent. “Instead of protecting our environment and combating climate change, he has worked to protect the interests of the fossil fuel industry and polluters all over the country.”

Mr. Pruitt is the third Cabinet member to leave the administration this year, after Secretary of State Rex W. Tillerson’s firing and Veterans Affairs Secretary David Shulkin’s ouster.

Just weeks ago, Mr. Trump told reporters that Mr. Pruitt was “doing a great job within the walls of the EPA.” He praised the administrator and the EPA for helping to foster a pro-growth business climate in the U.S.

“I mean, we’re setting records,” the president said. “Outside, he’s being attacked very viciously by the press. And I’m not saying that he’s blameless, but we’ll see what happens.”

On Tuesday, Mr. Pruitt was confronted at a D.C. restaurant by schoolteacher Kristin Mink, who listed several critiques of his work at the EPA and then asked him to resign.

“I just wanted to urge you to resign because of what you’re doing to the environment in our country,” she said to Mr. Pruitt while holding her young son.

Last month, the federal Office of Government Ethics asked the EPA’s inspector general to expand an investigation of Mr. Pruitt to include fresh claims that he directed staff to run personal errands for him and to seek business opportunities for his wife.

The EPA’s internal watchdog was looking into complaints that Mr. Pruitt misused taxpayer money on first-class travel and that he obtained a sweetheart rental deal from a Washington energy lobbyist.

Mr. Pruitt also has been under fire for allowing unusually large pay raises for aides.

On Thursday Rep. Elijah E. Cummings of Maryland, the ranking Democrat on the House Oversight and Government Reform Committee, detailed some of the complaints in a letter he had written to the agency’s inspector general.

Mr. Cummings said he had obtained evidence that Mr. Pruitt had staffers doctor his official schedules and asked staffers to help his wife win a political fundraising job and his daughter score a White House internship and a legal fellowship.

Mr. Cummings also announced that a top EPA attorney said Mr. Pruitt had talked with Mr. Trump about replacing Attorney General Jeff Sessions as head of the Justice Department.

While he came under constant fire from the left, Mr. Pruitt’s stock also fell among prominent Midwestern Republicans after he weakened the federal ethanol mandate known as the Renewable Fuel Standard. The program requires millions of gallons of corn-based ethanol to be blended with the nation’s gasoline supply each year.

That left him with dwindling political cover even as the scandals mounted.

“Administrator Pruitt’s ethical scandals and his undermining of the president’s commitment to biofuels and Midwest farmers were distracting from the agency’s otherwise strong progress to free the nation of burdensome and harmful government regulations,” said Sen. Chuck Grassley, Iowa Republican and the most vocal ethanol champion in Congress. “Fewer things are more important for government officials than maintaining public trust. Administrator Pruitt, through his own actions, lost that trust.”

Iowa is the nation’s leader in ethanol production.

Mr. Pruitt was involved in White House negotiations with the ethanol sector to reform the program, but critics said he acted in bad faith by simply granting waivers to oil refiners. Under terms of the Renewable Fuel Standard, refiners are responsible for ensuring that the required amounts of ethanol are mixed with the country’s fuel supply.

Environmental advocates celebrated Mr. Pruitt’s exit.

“Wildlife should be dancing in the streets. Mr. Pruitt was bad for the environment and bad for wildlife. He will not be missed,” said Jamie Rappaport Clark, president and CEO of Defenders of Wildlife.

Sen. James M. Inhofe, Oklahoma Republican, stood by Mr. Pruitt.

“Scott Pruitt did great work to reduce the nation’s regulatory burdens facing our nation while leading the Environmental Protection Agency,” Mr. Inhofe said in a statement. “He was single-minded at restoring the EPA to its proper statutory authority and ending the burdensome regulations that have stifled economic growth across the country. I was pleased to work with him on critical issues, like pulling out of the Paris Climate Agreement and prioritizing the cleanup of Superfund sites.”

• Ben Wolfgang contributed to this article.