Scott Pruitt, the former attorney general of Oklahoma, was confirmed by the Senate by a vote of 52-46 to lead the U.S. Environmental Protection Agency on Friday afternoon, after a marathon all-night session in which Democrats held the floor for hours to oppose his nomination.

The vote came less than a day after an Oklahoma court ordered Pruitt to release thousands of pages of correspondence between his office and the oil-and-gas industry, saying Pruitt had been in “abject failure” to comply with Oklahoma’s open-records law.

With his confirmation, the EPA gets a leader more hostile to its policies than it has had in three decades. Pruitt’s official state website has long called him a “leading advocate against the EPA’s activist agenda.” Now, he will get to set that agenda.

Two Democratic senators, Joe Manchin of West Virginia and Heidi Heitkamp of North Dakota, voted to confirm Pruitt.

Susan Collins of Maine was the sole Republican to oppose the nominee. “I have significant concerns that Mr. Pruitt has actively opposed and sued the EPA on numerous issues that are of great importance to the state of Maine,” she said on Wednesday, citing his work to remove restrictions on airborne mercury emissions and cross-state smog.

She added that he is a “an accomplished attorney with considerable knowledge about environmental laws,” and that she might have supported him for a position elsewhere in the government.

Pruitt faced unprecedented opposition from the public, environmental groups, and from civil servants within the EPA itself. Constituents placed thousands of calls with swing-state senators, and green non-profits took out costly ad buys opposing Pruitt’s nomination. More than 750 former EPA employees and officials asked for the Senate to reject Pruitt.

And for the first time in its history, the National Audubon Society—among the oldest and most centrist of conservation-minded groups—opposed a president’s Cabinet nomination.

In the end, it was not enough. Pruitt did not have a humorously inept committee hearing like Betsy DeVos, who was ultimately confirmed as Secretary of Education; nor did he face several lingering scandals and an allegation of domestic abuse, as did Andrew Pudzer. He also benefited from party unity. Unlike on free trade or foreign relations, reining in the environmental agency is a shared priority of both the Trump administration and congressional Republicans.

Pruitt’s controversies were also never able to break through a news environment crammed with bigger Trump scandals. But his confirmation this week means that large public-records releases could cloud his first days leading the agency. An Oklahoma judge has ruled that thousands of documents detailing his interaction with the fossil-fuel industry must be released by Tuesday, February 21; eight more major public-record dumps could follow.

The last time the Oklahoma attorney general’s office furnished a major public records request, it revealed that Pruitt had copy-and-pasted an oil company’s letter, almost word for word, and sent it to the EPA.

The open-records requests are also relevant because Pruitt declined to answer several questions posed to him by the Senate, directing senators to file open-records requests with his Oklahoma office.   

Pruitt will likely be sworn in early next week. Republicans have said that he will immediately seek to dismantle two major policies from the Obama administration: the Clean Power Plan, which restricts greenhouse-gas emissions from power plants while incentivizing states to switch to renewable energy; and the Waters of the United States rule, which clarified the bodies of water subject to federal Clean Water Act protections.

Both of those steps would be broadly popular with Republicans, who see these policies as unconstitutional overreach. But Pruitt could go further. Some Republicans involved in the EPA transition have said he might try to close the EPA’s enforcement division, which investigates and compels companies to comply with EPA rules.

Will that sit well with the public, who tell pollsters they like a strong EPA? Now we find out. In a confirmation questionnaire, Pruitt was asked by Senator Tom Carper, a Democrat of Delaware: “Can you name one Clean Air Act regulation—not a voluntary or grant program—that is on the books today that you do support?”

Pruitt did not name a single one.