Updated

Scott Pruitt has resigned as head of the Environmental Protection Agency after a string of controversies involving his leadership, President Trump announced Thursday on Twitter.

"Within the Agency Scott has done an outstanding job, and I will always be thankful to him for this," tweeted Trump, who added that EPA Deputy Administrator Andrew Wheeler would take over as acting administrator effective Monday.

"I have no doubt that Andy will continue on with our great and lasting EPA agenda," Trump concluded. "We have made tremendous progress and the future of the EPA is very bright!"

While traveling to a rally in Montana Thursday, Trump told reporters that Pruitt had approached him about resigning "a couple of days" earlier and said the two had "been talking about it for a little while."

"There was no final straw," Trump said. "Scott is a terrific guy. He came to me and he said, 'look, I have such great confidence in the administration. I don’t want to be a distraction' ... It was very much up to him."

In his resignation letter to Trump, Pruitt said: "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 [and] my family, are unprecedented and have taken a sizable toll on all of us," Pruitt added.

Hours before his departure was made public, Pruitt appeared at a White House picnic for Independence Day. Trump gave him and other officials a brief shout-out, offering no sign of any immediate change in his job.

Pruitt resigned less than a week after The New York Times reported that the EPA's chief ethics official, Kevin Minoli, had been pushing for a series of independent investigations into several aspects of Pruitt's tenure. Those included Pruitt's rental of a Washington, D.C. condominium for $50 per night from the spouse of a prominent fossil fuel lobbyist, which was first reported in March.

Both Pruitt and the lobbyist, Steven Hart, denied he had conducted any recent business with the EPA. But, Hart was later forced to admit he had met with Pruitt at EPA headquarters last summer after his firm, Williams & Jensen, revealed he had lobbied the agency on a required federal disclosure form.

In all, the Times reported, Pruitt is facing 13 federal inquiries into his spending and management practices.

Earlier this month House Democrats asked the Justice Department to investigate Pruitt for potential criminal conduct, alleging that he repeatedly violated federal anti-corruption laws by seeking to leverage his government position for personal gain. They cited the condo arrangement as well as Pruitt directing an EPA aide to contact a senior Chick-fil-A executive as part of an effort to land his family a franchise, and a $2,000 payment to his wife from organizers of a conference Pruitt then attended at taxpayer expense.

Pruitt also had faced questions about his frequent travel, spending between $2,000 and $2,600 on first-class plane tickets back to his home state of Oklahoma, where he had served as the state attorney general prior to coming to Washington.

Another controversy saw Pruitt come under fire for allegedly approving pay raises for two of his staff members using a little-known provision in the Safe Drinking Water Act after the White House refused to sign off on the increases.

When asked about the raises by Fox News this past April, Pruitt said he had just found out about them and was taking action to correct them. Documents showed Pruitt's chief of staff had signed off on the pay hikes, suggesting he had the administrator's consent.

Still other reports contained revelations of unusual security spending, including a $43,000 soundproof booth for making private phone calls. Pruitt also demanded 24-hour-a-day protection from armed officers, resulting in a swollen 20-member security detail that blew through overtime budgets and racked up expenses of more than $3 million.

Pruitt also had ordered his EPA staff to do personal chores for him, picking up dry cleaning and trying to obtain a used Trump hotel mattress for his apartment.

While in his job, Pruitt worked relentlessly to dismantle Obama-era environmental regulations. But, despite boasts of slashing red tape and promoting job creation, Pruitt had a mixed record of producing real-world results. Many of the EPA regulations Pruitt scrapped or delayed had not yet taken effect, and the tens of thousands of lost coal mining jobs the president pledged to bring back never materialized.

Environmental groups and Democrats cheered Pruitt's resignation, with The Sierra Club deploying the Twitter hashtag "#PruittBooted"

"Ethics matter. So does a commitment to EPA’s mission," Natural Resources Defense Council President Rhea Suh tweeted. "Pruitt failed miserably on both counts. If his successor puts interests of polluters ahead of protecting public health, they will encounter the same wall of resistance, & meet the same fate."

"Good riddance," Kieran Suckling, executive director of the Center for Biological Diversity, told Fox News in an emailed statement. "Pruitt was the most secretive, hostile, paranoid EPA Administrator in history. It will take a decade to reverse the damage he did to America's air, water, farm workers and children."

House Democratic Leader Nancy Pelosi tweeted: "One down with the resignation of [Pruitt], dozens more to go until we’ve drained the swamp of the Trump Admin’s toxic culture and corruption."

Responding to Trump's tweet about Pruitt's resignation, Senate Democratic Leader Chuck Schumer said: "Took you long enough. Still a very long way to go to fully #DrainTheSwamp."

Sen. Bernie Sanders, I-Vt., called Pruitt "the worst EPA administrator in the history of the agency."

"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," Sanders said in a statement. "His resignation is a positive step forward for our country."

Sen. Tom Carper, D-Del., the ranking member of the Environment and Public Works Committee, said Pruitt's "brazen abuse of his position for his own personal gain has been absolutely astounding, rivaled only by the silence of far too many in Congress and in the White House who allowed Mr. Pruitt’s unethical, and, at times, possibly illegal behavior to go unchecked.

"History will not look kindly on this era."

Pruitt is the latest Trump Cabinet official to lose his job over ethics issues. Veterans Affairs Secretary David Shulkin was fired in March amid questionable travel charges and a growing rebellion in his agency about the privatization of medical care. Health and Human Services Secretary Tom Price was fired last year after it was disclosed he took costly charter flights instead of commercial planes.

Fox News' John Roberts, Serafin Gomez, Chad Pergram and The Associated Press contributed to this report.