What happened

Shares of Colombia's state-run oil giant Ecopetrol (EC -0.43%) were plunging today, down 13.1% as of 1:03 p.m. ET, on an otherwise strong day for the markets and the oil sector.

The reason behind the decline wasn't hard to discern: Over the weekend, Colombia held its presidential election, and the winner was Gustavo Petro, the country's first left-wing president in its history.

Petro was once part of a leftist militia group. His running mate is the country's first black and second female vice president, who is also an environmental activist.

During his campaign, Petro said his administration would seek to phase out drilling for all fossil fuels. While Colombia's president does not have unlimited power, clearly Ecopetrol investors are stepping to the sidelines to see what happens in the months ahead.

So what

A large part of Petro's campaign centered around phasing out fossil fuel production in Colombia, which produces about 1% of the world's oil. This is a pretty extreme position, considering oil is Colombia's largest export.

But rather than dismantling Ecopetrol, Petro wishes to have it transition into a clean-energy powerhouse. In February, he tweeted: "Our proposal is for Ecopetrol to become the largest solar energy generation company in Latin America, gradually abandoning oil extraction. We would get more value and more fight against climate change."

Ecopetrol investors probably aren't investing in the company to see it pull off a radical change in its business model, so it's no wonder the uncertainty caused a big sell-off today. In terms of specifics, Petro wants to halt all new licenses for oil and gas exploration, as well as all new onshore fracking and offshore development projects.

Now what

Since the election was just this weekend, it's a bit early to tell how impactful Petro will be, as there are still significant obstacles to his agenda. First, Colombia has a strict one-term policy for its presidents, so Petro will only have four years to realize his vision. Meanwhile, he does not have a majority in Colombia's Parliament, so he might have difficulty passing environmental legislation that can't be instituted solely by executive mandate. Also, Colombia's Supreme Court can thwart any measures the Petro administration takes.

Nevertheless, there is now considerable uncertainty for Ecopetrol, which might not be able to embark on new oil and gas projects in the near term. And if Petro is more successful, Ecopetrol may have to transition more quickly into clean energy, where it doesn't have as much experience.

The Ecopetrol story is a lesson for investors in the oil and gas sector. While there is the business-execution side of things, you also need to have a view on local political movements around the world, as well as the global push-and-pull of climate change concerns versus the importance of oil and gas in today's economy.