Scott Pruitt testifies during his Senate confirmation hearing for EPA administrator, Jan. 18, 2017. Getty Images

The Senate confirmed President Donald Trump's nominee, Oklahoma Attorney General Scott Pruitt, to lead the Environmental Protection Agency on Friday in a mostly party line vote.

The confirmation vote came after contentious hearings during which Democratic lawmakers questioned Pruitt over his ties to fossil fuel companies, his multiple legal challenges to EPA regulations and his public statements questioning the science behind climate change. Senate Democrats boycotted a committee vote to move forward Pruitt's nomination earlier this month and stretched debate before the full Senate into the early hours of Friday. On Thursday evening, some Democrats again called for Pruitt's confirmation vote to be delayed after an Oklahoma judge ordered his office to turn over thousands of communications with fossil fuel companies to a watchdog group.

But the nominee appeared to have the votes needed to win confirmation on Friday. Democrats Heidi Heitkamp of North Dakota and Joe Manchin of West Virginia, both from energy-producing states, voted with Republicans to confirm Pruitt. Just one GOP senator, Susan Collins of Maine, voted against Pruitt. The final vote was 52 to 46 in favor of confirmation.

While Democrats and environmentalists bristled at Pruitt's nomination from the start, conservatives and the energy industry have welcomed his efforts to place more power over drilling and mining regulations in the hands of states. He set up a "federalism unit" at the office of the Oklahoma attorney general to "combat unwarranted regulation and overreach by the federal government." Pruitt is seen as an ideal candidate to execute Trump's promises to scale back the EPA's Obama-era initiatives. He has been a leading figure in a campaign by Republican attorneys general to sue government agencies over some of President Barack Obama's landmark achievements, including the Affordable Care Act and regulations to reduce the impacts of climate change. A Pulitzer Prize-winning New York Times investigation found Pruitt's office in 2011 signed a letter criticizing environmental regulations that was drafted by lawyers for Devon Energy. During his confirmation hearing, Pruitt rejected the claim he acted on behalf of energy companies in suing the EPA more than a dozen times. He said the suits were in the interest of Oklahoma citizens given the role of energy in the state's economy. Trump plans to announce executive orders during Pruitt's swearing in at EPA headquarters, Reuters reported this week, citing sources who were briefed on the plans. Earlier in the week, Beltway newsletter Inside EPA reported the planned orders may impact the agency's work on climate change, citing an administration source. The president has vowed to cancel Obama's Climate Action Plan, a framework for reducing greenhouse gas pollution, and the Clean Power Plan, a rule limiting carbon emissions from power plants. He has also threatened to defund the Paris Agreement, an international accord aimed at reducing the impact of climate change. Trump promises to increase U.S. coal, natural gas and crude oil production, in part by making federal land more readily available to drillers and miners.

Watch: Controversy swirls around Pruitt