Five years after saying he would dismantle the Department of Energy (DOE) if he were elected president, the Senate on Thursday voted to confirm former Texas Gov. Rick Perry as the department’s next secretary.

Meanwhile, Department of Interior (DOI) Secretary Ryan Zinke, who won Senate confirmation on Wednesday, rode to work in Washington, DC, on a horse Thursday.

The Republican-controlled Senate voted 62-37 in favor of Perry’s nomination. Ten Democrats — including Sens. Heidi Heitkamp (D-ND), Joe Manchin (D-WV) and Jon Tester (D-MT) — crossed party lines to support Perry.

“This is a critical time for the DOE, and it needs steady leadership as we pursue the broad benefits of energy innovation and greater security for our nation’s energy infrastructure,” said Sen. Lisa Murkowski (R-AK), chairman of the Senate Committee on Energy and Natural Resources. “The DOE’s scientists and our national labs are vital to that effort, and I believe Gov. Perry will be a strong partner as we focus on everything from reducing rural energy costs to advancing the Alaska gasline project.”

The energy industry also congratulated Perry.

“In recent years, the agency has overstepped its mission by tipping the scales in favor of certain technologies like wind and solar power,” said American Energy Alliance President Thomas Pyle. “We look forward to Secretary Perry returning the DOE to its core mission and making sure the agency acts in the best interest of the American people.”

Sen. Maria Cantwell (D-WA), the ranking member of the Senate Committee on Energy and Natural Resources, spoke out against Perry’s nomination before the vote and urged her colleagues to do the same.

“We need to make sure that our energy balance in the United States is going to support the [research and development], the scientists, the investments in electricity [and] cybersecurity that are going to help make our nation safe.”

Her Democratic counterpart from Washington state agreed.

“I find it telling that we are here again, debating yet another cabinet nominee sent over from the White House…whose interests have been more closely aligned with those of big oil and corporations, rather than advancing our country’s energy challenges or fighting for the working families that we represent,” said Sen. Patty Murray (D-WA).

Environmental groups also weighed in on Perry’s confirmation. “In an administration where the oil and gas industry is at the tiller, it will be essential to hold Perry and the DOE accountable for moving us forward with the renewable power and clean solutions that are actually creating jobs and reinvigorating our energy economy,” said Abigail Dillen, a vice president with the environmental group Earthjustice.

In January, Perry’s nomination passed out of the Senate Committee on Energy and Natural Resources on a 16-7 vote.

The other seven Democrats who voted in favor of Perry on Thursday were Sens. Thomas Carper (D-DE), Catherine Cortez Masto (D-NV), Joe Donnelly (D-IN), Claire McCaskill (D-MO), Debbie Stabenow (D-MI), Tom Udall (D-NM) and Mark Warner (D-VA).

Sen. Angus King (I-ME), who caucuses with the Democrats, also voted for Perry. Meanwhile, Sen. Bernie Sanders (I-VT) joined with 36 other Democrats in voting against the confirmation. Sen. Johnny Isakson (R-GA) did not cast a vote.

In his unsuccessful bid for president in the 2012 race, Perrycalled for the dismantling of the Environmental Protection Agency (EPA) and the suspension and reconsideration of several rules administered by the agency. He also called for the creation of a separate court to address challenges to energy projects and greater access to onshore and offshore oil and natural gas resources.

During a presidential debate in November 2011, Perry said that if he were elected president, he would abolish three government agencies, but at that moment he was only able to identify two of them: the Department of Commerce and the Department of Education. Later in the debate, he said the third agency was DOE. The matter was considered a gaffe, and Perry dropped out of the race the following January.

A second bid for the White House was launched by Perry in 2015, but he dropped out after three months. Perry threw his support behind Sen. Ted Cruz (R-TX) in January and endorsed Trump in May after Cruz dropped out.

Perry was first elected to the Texas House of Representatives in 1984, as a Democrat. He served three two-year terms in the chamber before switching to the Republican Party in 1989. Perry was then twice elected as the state’s agriculture commissioner, serving two four-year terms before winning the race for lieutenant governor in 1998. He assumed the governorship in 2000 after George W. Bush won the election for president.

Perry won the race for governor in his own right in 2002, and was re-elected in 2006 and 2010. He became the first governor in Texas history to win three four-year terms.

Zinke takes the reins at DOI — literally

DOI Secretary Zinke rode a horse through the streets of Washington to the department’s headquarters on Thursday, accompanied by nine members of the U.S. Park Police, who were also on horseback.

According to the Washington Post, Zinke rode Tonto, an Irish sport horse and bay roan gelding whose height is just over 17 hands tall. Tonto is normally kept in stables on the National Mall and is owned by the U.S. Park Police, the report said. About 350 employees of DOI waited outside to greet Zinke.

Zinke tweeted Thursday morning that he was “honored to stand with the brave officers of the U.S. Park Police — these professionals put their lives on the line for us.” A few minutes later, he tweeted that he was “humbled by the warm welcome at DOI this morning.” DOI’s Bureau of Safety and Environmental Enforcement also tweeted a picture of Zinke on horseback and welcomed him.