2of4FILE - JULY 5, 2018: President Donald Trump has announced that Environmental Protection Agency chief Scott Pruitt has resigned July 5, 2018. WASHINGTON, DC - JUNE 02: Environmental Protection Agency Administrator Scott Pruitt answers reporters' questions during a briefing at the White House June 2, 2017 in Washington, DC. Pruitt faced a barrage of questions related to President Donald Trump's decision to withdraw the United States from the Paris climate agreement. (Photo by Chip Somodevilla/Getty Images)Photo: Chip Somodevilla

3of4FILE - JULY 5, 2018: President Donald Trump has announced that Environmental Protection Agency chief Scott Pruitt has resigned July 5, 2018. WASHINGTON, DC - APRIL 26: EPA Administrator Scott Pruitt enters the hearing room prior to his testimony before the House Appropriations Committee during a hearing on the 2019 Fiscal Year EPA budget at the Capitol on April 26, 2018 in Washington, DC. The focus of nearly a dozen federal inquiries into his travel expenses, security practices and other issues, Pruitt was on the Hill to testify about his agency's FY2019 budget proposal. (Photo by Alex Edelman/Getty Images)Photo: Alex Edelman

4of4NEW YORK, NY - JUNE 6: Protestors rally against Environmental Protection Agency (EPA) Administrator Scott Pruitt outside the federal office building that houses the New York City office of the Environmental Protection Agency (EPA), June 6, 2018 in New York City. Pruitt is under fire again this week after emails showed he asked an EPA staff member to contact Chick-fil-A for potential business opportunities for his wife. Federal ethics rules prohibit government employees from using their positions for private gain and prohibit supervisors from directing subordinates to carry out personal errands. Earlier in the week it was also disclosed that Pruitt asked an aide to inquire with the Trump International Hotel about purchasing a used mattress. (Photo by Drew Angerer/Getty Images)Photo: Drew Angerer / Getty Images

WASHINGTON — Scott Pruitt, President Trump’s administrator of the Environmental Protection Agency, resigned after facing months of allegations over legal and ethical violations.

Trump announced the resignation in a tweet Thursday in which he thanked Pruitt for an “outstanding job” and said the agency’s deputy, Andrew Wheeler, a former coal lobbyist, would take over as the acting administrator Monday. In his resignation letter, Pruitt cited “unrelenting attacks on me personally” as one of the reasons for his departure, an apparent reference to the numerous investigations into his stewardship of the agency.

Pruitt had been hailed as a hero among conservatives for his zealous deregulation, but he could not overcome a spate of ethics questions about his alleged spending abuses, first-class travel and cozy relationships with lobbyists. Earlier on Thursday, the New York Times reported on new questions about whether aides to Pruitt had deleted sensitive information about his meetings from his public schedule, potentially in violation of the law.

Pruitt also came under fire for enlisting aides to obtain special favors for him and his family, such as reaching out to the chief executive of Chick-fil-A, Dan Cathy, with the intent of helping Pruitt’s wife, Marlyn, open a franchise of the restaurant.

Pruitt, a former Oklahoma attorney general who built his career on lawsuits against the agency he would eventually lead, remained a favorite of Trump’s for the majority of his tenure at the EPA. He began the largest regulatory rollback in the agency’s history, undoing, delaying or blocking several Obama-era environmental rules. Among them was a suite of historic regulations aimed at mitigating global-warming pollution from vehicles and power plants in the United States.

Pruitt also played a lead role in urging Trump to follow through on his campaign pledge to withdraw the United States from the 2015 Paris climate agreement, despite warnings from some of the president’s other senior advisers that the move could damage the United States’ credibility in foreign policy. Under the landmark accord, nearly every country committed to reducing emissions of planet-warming fossil fuel pollution.

In 2017, Pruitt made headlines for questioning the established science of human-caused climate change, contradicting decades of research by scientific institutions, including his own agency. Although Pruitt was harshly criticized for the remarks, they did not affect his good standing with a president who has also mocked climate science.

Trump has repeatedly told associates that Pruitt has done what he has wanted in terms of cutting regulations, so he has been reluctant to let him go. Pruitt has made himself available to the president as a confidant as well as a possible future attorney general.

But White House advisers for months have implored Trump to get rid of Pruitt, including his chief of staff, John Kelly. Ultimately, the president grew disillusioned with Pruitt after a cascade of accusations of impropriety and ethical missteps overshadowed Pruitt’s policy achievements.

In recent days, people who have spoken with Trump said he sounds exasperated with his EPA administrator’s negative headlines. “It’s one thing after another with this guy,” one person close to Trump quoted the president as saying.

Pruitt is the subject of at least 13 federal investigations, and a government watchdog agency concluded he had broken the law with his purchase of a $43,000 secure telephone booth. He was also under investigation for his 2017 lease of a bedroom in a condominium linked to a Canadian energy company’s powerful Washington lobbying firm and for accusations that he demoted or sidelined EPA employees who questioned his actions.

Pruitt had come under criticism for lavish expenditures on foreign travel, including a trip arranged for him by a lobbyist to Morocco, a country where the EPA has no policy agenda. His domestic travel also came under fire after a former staff member told congressional investigators that his boss often sought to travel to Oklahoma, where Pruitt owns a home, directing his employees to “find me something to do” there so he could justify charging taxpayers for the expense.

A New York Times report detailed Pruitt’s lavish spending and questionable practices in his home state.

While Democrats have criticized Pruitt since his nomination, in recent months even conservative Republicans had taken the unusual step of criticizing and questioning his ethics.

Bay Area environmentalists on Thursday welcomed Pruitt’s resignation, but they said they were wary about Wheeler, his interim replacement.

“I’m not sure that what we’re getting is much different from what’s leaving,” said environmental scientist Lynda Deschambault, who resigned from the EPA’s regional office in San Francisco about a year ago.

At the time Deschambault left, morale was sinking at Region 9, the Pacific Southwest branch of the agency. Veteran managers and enforcement officers were being sidelined or pushed out, according to workers who spoke with The Chronicle.

Deschambault said that oil company representatives would regularly come to the Region 9 office and complain that she was demanding too many samples and setting too many aggressive timelines for cleanup of toxic Superfund sites.

Local environmentalists expressed doubt that policies would change under Wheeler, given his strong ties to the coal industry.

“If I had to hazard a guess, I’d say Trump’s administration is probably thrilled to have Wheeler,” said Sejal Choksi-Chugh, executive director of San Francisco Baykeeper, a nonprofit that fights pollution in the bay and other water bodies.

She said she hopes the Senate will “stand strong” and block any attempts to install Wheeler in the top EPA job permanently.