Image copyright AFP Image caption Mr Pruitt is the subject of at least a dozen investigations

Scandal-hit Scott Pruitt has resigned as head of the US Environmental Protection Agency.

In a letter to President Donald Trump, he blamed "unrelenting attacks" on himself and his family.

Mr Trump tweeted that Mr Pruitt had done "an outstanding job, and I will always be thankful to him".

But since taking office Mr Pruitt has been mired in series of scandals concerning his spending habits and alleged misuse of office.

His deputy Andrew Wheeler, a former coal industry lobbyist, will take over as acting head of the agency, Mr Trump said.

Mr Pruitt is the subject of at least a dozen investigations into his conduct.

He has been under scrutiny for renting an apartment with ties to a fossil fuels lobbyist at a below market rate.

He is also accused of bypassing the White House to secure big pay rises for two long-time staff members.

Earlier on Thursday, US media reported that he had asked his scheduler to retroactively alter his public calendar - which may be a federal crime - to scrub politically sensitive meetings.

He angered liberals and environmentalists by severely curtailing the agency's activities and repealing many measures designed to protect the environment.

Mr Trump had become fed up with the onslaught of news stories about Mr Pruitt, including reports that he had tried to persuade Mr Trump to fire Attorney General Jeff Sessions so that he could take his job.

"It's one thing after another with this guy," an exasperated Mr Trump was quoted as saying, reports the New York Times.

Skip Twitter post by @realDonaldTrump I have accepted the resignation of Scott Pruitt as the Administrator of the Environmental Protection Agency. Within the Agency Scott has done an outstanding job, and I will always be thankful to him for this. The Senate confirmed Deputy at EPA, Andrew Wheeler, will... — Donald J. Trump (@realDonaldTrump) July 5, 2018 Report

Skip Twitter post 2 by @realDonaldTrump ...on Monday assume duties as the 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! — Donald J. Trump (@realDonaldTrump) July 5, 2018 Report

What did Mr Pruitt himself say?

In his resignation letter, Mr Pruitt said he was stepping down from Friday.

Media playback is unsupported on your device Media caption Kristin Mink confronts Scott Pruitt in a restaurant in Washington DC

"Truly, your confidence in me has blessed me personally and enabled me to advance your agenda beyond what anyone anticipated at the beginning of your administration," he said.

"However, the unrelenting attacks on me personally, my family, are unprecedented and have taken a sizeable toll on all of us," he added.

Mr Pruitt becomes the fourth cabinet-level official of the administration to resign or be fired, after Health and Human Services Secretary Tom Price, Secretary of State Rex Tillerson and Veteran Affairs Secretary David Shulkin.

A career seriously derailed

By Anthony Zurcher, BBC News, Washington

On Thursday morning CNN quoted an unnamed senior White House official saying that the Pruitt controversies were "inching toward the tipping point". It turns out that point was very close indeed.

The EPA chief had managed to hold out longer than most expected as a cavalcade of controversies mounted, each alone enough to fell a Cabinet appointee in a past administration.

Mr Pruitt had survived due to a combination of the vigour with which he advanced the conservative goal of paring regulations and weakening the agency and Mr Trump's natural reluctance to cede to a political outcry.

In the end, however, it was Mr Pruitt who had been weakened beyond repair - hobbled by allegations of abuse of the power and privileges of office. Mr Trump had come to Washington pledging to "drain the swamp", and Democrats - with mid-term elections looming - were poised to point to Mr Pruitt as a prime example of how the swamp had consumed the president and Republicans in general.

With Andrew Wheeler - a former coal industry lobbyist - set to run the agency for the immediate future, little will probably change as far as policies and priorities within the EPA. Many Republicans in Washington, who were growing uneasy with Mr Pruitt's seemingly never-ending bad press, will surely be happy with the change.

Their relief, however, may be tinged with a certain amount of regret. Mr Pruitt had proven to be an effective champion of the conservative fight against the EPA - and even environmentalists had recognised him as a formidable adversary.

Mr Pruitt himself had aspirations for higher office - either within the administration or back home in Oklahoma. While political careers these days are rarely permanently ended, at least for the moment his has been seriously derailed.

What has the reaction been?

Democrats welcomed the resignation, but there was also little enthusiasm for his replacement Mr Wheeler, a former coal industry lobbyist.

Massachusetts Senator Ed Markey said "#BigOil's right hand man" was being replaced by "King Coal's best lobbyist".

New York Congressman Patrick Maloney compared Mr Pruitt to a former president.

Skip Twitter post by @RepSeanMaloney Good riddance. Scott Pruitt didn't care about protecting our environment, didn't believe in science, and was about as ethical as Richard Nixon. Let's get someone in that post that will actually defend the environment. https://t.co/7HUaM3jooy — Sean Patrick Maloney (@RepSeanMaloney) July 5, 2018 Report

What about the president?

A staunch conservative, Mr Pruitt has strongly backed Mr Trump over his decision to pull out of the Paris climate accords.

In his turn Mr Trump has praised him for cutting back environmental regulations which he blames for stifling economic growth.

But the White House appears to have cooled towards Mr Pruitt recently.

On Tuesday spokesman Hogan Gidley described the controversies facing Mr Pruitt as "troublesome" and said Mr Trump was "looking into" them.

Mr Pruitt is also under investigation for: