(CNN) Environmental Protection Agency Administrator Scott Pruitt has resigned after months of ethics controversies , citing "the unrelenting attacks" on himself and his family, which "have taken a sizable toll on all of us."

President Donald Trump first tweeted the news Thursday that Pruitt had resigned.

"I have accepted the resignation of Scott Pruitt as the Administrator of the Environmental Protection Agency," Trump tweeted. "Within the Agency Scott has done an outstanding job, and I will always be thankful to him for this."

Pruitt's resignation follows months during which the EPA administrator has been embroiled in one ethics controversy after the next.

It also comes two days after an exclusive CNN investigation revealed a former top aide alleged Pruitt and his staffers held regular meetings to "scrub," alter or remove controversial events from his calendar. That investigation sparked two Democratic congressman to call Thursday for the EPA inspector general to investigate whether Pruitt committed a federal crime.

Trump said on Twitter that Pruitt's recently Senate-confirmed deputy Andrew Wheeler will on Monday assume the duties of acting administrator of the EPA.

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

On Air Force One en route to Montana later Thursday, Trump voiced support for Pruitt, saying the allegations against his EPA head did not bother him but he accepted the resignation because Pruitt believed they had become a distraction.

"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.' "

Trump said Pruitt had approached him about resigning "a couple of days" prior and that the decision was "very much up to" Pruitt.

Asked if there was anything about the accusations against Pruitt that troubled him, the President said, "No."

"He'll go on to great things," Trump said. "He's going to have a wonderful life, I hope."

Cloud over Pruitt

An ethics cloud hung over Pruitt for months, as lawmakers from both parties, environmental groups and government watchdogs raised questions about his spending, housing arrangements, security team and raises for political appointees.

Pruitt's resignation letter to Trump offered regret about leaving the role, but said "unrelenting attacks" had taken a toll.

"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," Pruitt wrote. "However, the unrelenting attacks on me personally, my family, are unprecedented and have taken a sizable toll on all of us."

He added, "My desire in service to you has always been to bless you as you make important decisions for the American people. I believe you are serving as President today because of God's providence. I believe that same providence brought me into your service. I pray as I have served you that I have blessed you and enabled you to effectively lead the American people."

Two EPA officials told CNN they found out about Pruitt's resignation from Trump's tweet and had no idea the news was coming.

Pruitt had lost the confidence of many career and political EPA appointees, but many of those eager to see him go had begun to lose hope that he would resign or be pushed out by the President.

"Still in shock to be honest," one EPA official told CNN. "Incredible that he lasted as long as he did."

All told, Pruitt left EPA having faced more than a dozen inquiries or reviews into his practices at the agency, including his first-class plane travel, a room that he rented from a lobbyist at $50 per night and the installation of a soundproof booth in his office.

A spokesman for the EPA's Office of Inspector General told CNN that ongoing or pending reviews of Pruitt will continue, even though he has resigned.

"Any ongoing or pending OIG reviews related to the Administrator and/or his team will continue—regardless of the Administrator's resignation," the spokesman said.

But at the same time, Pruitt was one of the most effective implementers of the President's agenda. Coming into office as a critic of EPA and a climate skeptic, Pruitt moved aggressively to scale back Obama-era moves on climate change, automobile pollution standards and other industrial pollutants.

As recently as June 8, Trump praised Pruitt, telling reporters on the South Lawn of the White House that the EPA administrator was "doing a great job within the walls of the EPA," and that "we're setting records."

"Outside, he's being attacked very viciously by the press. I'm not saying that he's blameless, but we'll see what happens," Trump said then, and didn't answer a reporter who asked if T rump was "tired' of Pruitt.

Pruitt was also involved in some intra-administration maneuvering this spring when he urged Trump to fire Attorney General Jeff Sessions and install Pruitt as the head of the Department of Justice, according to three sources.

But as summer unfolded, the amount of pressure on Pruitt began to near its breaking point as former staffers came forward to air their concerns and accusations about the EPA chief. Former aide Kevin Chmielewski told CNN that Pruitt and his staff kept "secret" calendars and schedules to hide controversial contacts with industry representatives and The Washington Post and The New York Times revealed aspects of testimony Pruitt aides gave to Congress about the EPA administrator enlisted them for personal errands.

Turn to the right

Pruitt, an Oklahoma Republican, came to the job as one of the EPA's chief critics and was seen as someone philosophically at odds with the agency Trump tapped him to run.

While serving as Oklahoma's attorney general, Pruitt was one of the chief architects of the legal battle against Obama's climate change policies and repeatedly sued the agency. He described himself in his biography for that job as "a leading advocate against the EPA's activist agenda."

Critics of Pruitt's nomination drew on his past statements to label him as a "climate skeptic," a term for someone who denies the scientific link between human activity, climate change and associated impacts.

Along with Trump, who once said that "global warming was created by and for the Chinese," Pruitt oversaw the efforts to dismantle major climate regulations. Trump announced at the beginning of June last year that he would withdraw the US from the Paris climate accords.

Pruitt announced in October he would withdraw the Clean Power Plan , an Obama-era regulatory structure to limit greenhouse gas emissions on a state-by-state basis.

Inquiries and reviews into Pruitt's practices at EPA

Pruitt incurred a sizable number of investigations into his spending and practices at EPA, including inquiries by the House, Senate, the EPA itself and the White House. Among them were inquiries into Pruitt's travel practices, spending within the agency and use of email.

The EPA inspector general is reviewing all of Pruitt's 2017 travel , which is expected to include multiple taxpayer-funded weekend trips that Pruitt took to Oklahoma, as well as official travel to Italy and Morocco. The inspector general told Congress in a May 2018 letter that he expects the review will be completed by the end of September.

A different EPA inspector general review involves Pruitt's travel practices, suggesting that it will review Pruitt's use of his round-the-clock security detail, which travels with him even when off-duty on family vacations.

Separately, South Carolina Rep. Trey Gowdy, the Republican who chairs the House Oversight Committee, has asked EPA to justify Pruitt's use of first or business class seats on flights.

There are also multiple inquiries into Pruitt's lease of a $50-a-night Capitol Hill condo in 2017 from lobbyist Vicki Hart. Hart's husband, J. Steven Hart, who is also a lobbyist, met with Pruitt at the same time that he was leasing that room.

A review of EPA emails showed deeper ties between Pruitt and lobbyists , including that a family friend of those lobbyists was considered for a position at EPA.

Both the EPA inspector general and the Government Accountability Office (GAO) are reviewing an April 2017 meeting that Pruitt had with the National Mining Association regarding the Paris climate agreement, which critics said may have violated anti-lobbying laws.

GAO found in April that Pruitt's installation of a $43,000 soundproof phone booth violated federal spending laws because EPA didn't notify lawmakers that it exceeded the $5,000 limit for agency heads to improve their offices. Pruitt and other EPA officials said Pruitt used the booth to receive classified information and to talk with White House and other administration officials.

Several reviews have to do with Pruitt's use of email. Senate Environment and Public Works Chairman John Barrasso, a Wyoming Republican, began looking into reports that Pruitt had four EPA email addresses, at least one of which was not disclosed. EPA's inspector general said in May that it would review Pruitt's use of multiple email accounts, at the request of Senate Democrats.