OPINION: Gustavo Petro, who became Colombia’s president this week, must have wondered if he would ever get the chance to be the country’s first ostensibly progressive head of state after unsuccessful attempts in 2010 and 2018.

The former Bogota mayor was once a member of M-19, a rebel group whose 1985 attempt to storm Bogota's Palace of Justice led to to a bloody stand-off with security forces.

His path was a familiar one in Colombia, where a historical pattern of polarisation and violence often pushed activists toward armed struggle.

Petro's track record as a lawmaker long ago dispelled any doubts about his democratic credentials, and his commitment to a fairer society, sustainable development and human rights has been consistent.

But his campaign messages against fossil fuels were often disconcerting to Colombians of an economically orthodox bent.

By promising a swift move away from coal and hydrocarbons, Petro appeared to be threatening two sectors that provide a large share of Colombia's export revenues.

In reality, he was never threatening any dramatic abrogation of contractual rights.

Offshore drilling campaigns by the likes of Shell and Petrobras are moving along smoothly, with good prospects for finding more oil and a lot of gas in an expansive Caribbean play.

However, Petro did seek an end to new licensing rounds. He is also aligned with his vice-president and newly appointed energy and environmental ministers in opposing fracking in Colombia, even though state-controlled Ecopetrol is convinced that unconventional production could extend the lifespan of reserves by at least a decade.

Petro is taking office at a time of rising prices and global supply chain constraints, and he lacks an outright congressional majority.

The appointment of orthodox economist Jose Antonio Ocampo as finance minister sends a strong message that his idealism will be tempered by pragmatism.

In recent interviews, Ocampo has come out in favour of continued exploration for natural gas, stressed the importance of crude exports to Colombia's balance of payments, and called for more reflection on the benefits of remaining "self-sufficent" in oil.

In a June column for El Espectador newspaper, he argued that Colombia should play its part in global climate efforts but should harmonise this contribution with its own development needs.

He described a growing role for renewables, decreasing reliance on fossil fuels and greater protection of forests from the advance of big agriculture, but he still called for wider use of natural gas during the energy transition.

It is not hard to envisage circumstances where, amid a wave of global economic malaise and rising US interest rates, South America's second most populous nation runs into difficulties.

Economic problems could spur policymakers back to the historic "extractivism" that Petro wants to leave behind.

For the time being, however, the mood in Bogota is optimistic.

The energy transition offers an opportunity for developing nations like Colombia that have high potential to produce wind and solar energy — and green hydrogen — on a large scale.

While former President Ivan Duque, Petro's predecessor, was seen as a backer of the oil industry, his administration had already made a decent start in this direction.

With democratic processes coming under pressure in Latin America's two most influential nations, Brazil and Mexico, the dignified transition of power that just took place in Colombia is to be welcomed.

Let's hope that its energy transition is equally successful.

(This is an Upstream opinion article.)