Five years ago, the Spanish conservative tipped to become the bloc's climate chief was denounced as the "Oil Baron" and "Señor Petrolhead" by angry environmentalists.

This week, Miguel Arias Cañete ends his term as one of the EU's leading climate campaigners. "I am a climate addict," he told POLITICO.

The 69-year-old Spanish aristocrat's metamorphosis tracks a broader transformation of Brussels' politics during the five-year mandate of outgoing Commission President Jean-Claude Juncker, a conservative former prime minister of Luxembourg.

Early on in the Juncker Commission, energy was seen as a hot portfolio. It promised pipeline fights, channeling billions into energy infrastructure investments and an effort to wean the EU off its dependence on Russian gas.

In contrast, the climate file was a lot less sexy — concerned with inscrutable international talks, and with just a handful of staff dedicated to it in Brussels.

"Everyone now wants to have a piece of the [climate] cake" — A senior EU official

People would call it one of the "shitty files," one official recently told POLITICO.

When Juncker was building his Commission in 2014, he joined the energy and climate portfolios and gave it to Arias Cañete, a former Spanish agriculture and environment minister who had incensed green groups by spearheading a law that allowed for more construction along Spain's coasts.

Arias Cañete's appointment sparked outrage, and a petition to block it gathered more than half a million signatures. "His deep ties to the oil industry and his appalling record as Spain’s environment minister make him unsuitable for the job, while creating a huge conflict of interest," it said.

Troubled start

Arias Cañete sold his shares in two oil companies, Petrolifera Ducar and Petrologis Canarias. He also shook off the backlash from making sexist comments — he had said he was forced to hold back during a 2014 televised debate because his opponent was a woman — for which he later apologized. He ended up getting Parliament's nod for the Commission job.

The new portfolio created by Juncker was a powerful one — combining the personnel and resources of the traditional energy brief with fast-rising concern about climate. As Juncker took a hands-off attitude toward climate policy, Arias Cañete became point man on an issue of global importance.

"Everyone now wants to have a piece of the [climate] cake," the senior official said.

During his time at the Commission, Arias Cañete has been a canny political operator. Maroš Šefčovič, the amiable Slovak who was named vice president in charge of the energy union — the Commission's signature energy policy — was ostensibly his boss. But with his large bureaucracy and decades of experience in the rough-and-tumble world of Spanish politics, Arias Cañete quickly sidelined his nominal superior.

"I've always seen Cañete as an experienced political player, who understood how he had to move in Brussels," said Wendel Trio, the head of Climate Action Network Europe, an NGO.

Over the last five years, European policymakers boosted green energy goals beyond what EU leaders had planned for in 2014, raised emission requirements on carmakers, led a reform of the troubled Emissions Trading System and introduced first-ever emission targets for trucks.

But he didn't succeed in dramatically overhauling the EU's climate objectives. The goal of cutting emissions by 40 percent by 2030 was set in 2014 and still hasn't changed. Efforts to boost the target were killed by powerful members such as Germany.

"In the end he was bound by the barriers," which undercut his legacy, said Bas Eickhout, a vice chair of the European Greens group.

Eickhout — a Dutch politician who's clashed with Arias Cañete over the bloc's climate legislation and revels in barbed comments about what he sees as a conservative climate agenda — says that Arias Cañete showed that he "moved on from his past."

"My biggest compliment is his devotion," Eickhout said. "He was always there in almost each [negotiation]. On the international scene, he also gave it all. So, he clearly internalized his new agenda."

In negotiations, Arias Cañete bet on personal links, bridge-building, non-confrontation — and stamina. In his attempt to convince EU members to sign up to new national emissions limits, he traveled the bloc, bonding with the coal-dependent Poles over vodka and a shared Catholic faith.

A growing file

The heft of Arias Cañete's portfolio became clear in 2015, during the Paris climate talks, when he played a key role in helping cobble together a deal along with the U.S. and China.

In Paris, he barely closed his eyes as he pushed for a deal — admitting to only 11 hours of sleep over the week.

What had been an esoteric issue was quickly becoming one of the world's most important priorities. With one U.N. report after another underlining the growing danger of a global catastrophe, climate change now dominates politics, economics and business.

Global warming and the drive to decarbonize affects much more than energy policy — everything from the effort to build electric cars, to recalibrating financial markets to properly account for climate risks and the impact of droughts and floods on agriculture has been subsumed under the label of "climate action."

By the end of his tenure, Arias Cañete was meeting with climate activist Greta Thunberg and pushing for the EU to become climate-neutral by mid-century.

The issue's political impact was underlined in this year's European election, when green and environmental parties surged and even conservative groups like Arias Cañete's European People's Party scrambled to adopt more aggressive climate policies.

Arias Cañete says he saw the political and environmental effects of a changing climate first hand. As the EU's chief negotiator in international climate negotiations, he's traveled to climate change hot spots in the Pacific, nurturing relations with island nations and other vulnerable developing countries.

But he has also given the Commission's climate efforts a conservative spin — seeing them as a possible economic spur.

"When you start to know the challenges, the impacts, the consequences, the devastating effects of meteorological phenomena in developing countries and when you begin to understand this is not irreversible — it is reversible — and you understand that it can create also economic benefits, then you have to become [an] addict to put the solutions on the table," Arias Cañete said.

By the end of his tenure, Arias Cañete was meeting with climate activist Greta Thunberg and pushing for the EU to become climate-neutral by mid-century.

Although he became a credible climate campaigner, the ethical issues that clouded his start at the Commission have continued to hang over him.

Transparency campaigners and left-wing Spanish MEPs over the years kept trying to oust him. Revelations that his wife featured in the Panama Papers — leaked documents of offshore financial dealings — fueled controversy about him. Miguel Urbán, a member of the left-wing GUE group, said in 2017: "The Cañete scandal is a stain on the EU and our democracy and that he must be sacked."

He's now heading into retirement. And despite his climate conversion, Arias Cañete remains a conservative Spaniard at heart. His post-Commission plans? Returning to his wife's family farm that raises fighting bulls (and maybe taking an occasional spin in an electric racing car), he told POLITICO.