After weeks of mounting opposition from the provincial government of British Columbia and environmental activists, the Canadian government announced it will purchase Kinder Morgan’s embattled Trans Mountain pipeline, taking on its multi-billion dollar expansion project. The surprising move by the Trudeau government will ensure that Canada remains a key global developer of crude oil and comes against the backdrop of OPEC’s decision to tamp down its output and the expectation that Iranian production will be cut by a third.

As economies and demand for energy grow, U.S. consumers are already seeing a price impact as the average price for a gallon of gas is up about 60 cents in the past year. Not surprisingly, this led to Senate Democrats blaming the president and demanding he call on foreign producers to open their spigots — instead of looking to reform their own policies that would shutter U.S. energy resources. But that view is myopic and fraught with peril as this would leave the U.S., its neighbors and other allies only more reliant on imported oil.

Considering that just .03 percent of the nation’s 250 million registered vehicles are electric, our nation will be using crude oil to fuel our transportation sector for generations to come. Additionally, we use petrochemicals for thousands of other products like plastics, medicines, hospital equipment, clothing, and even mobile phones.

As the energy Super Majors have successfully defended themselves against anti-energy protests over the past several decades, fringe protesters have taken to attacking midstream projects — like Canada’s Trans Mountain — in an effort to “keep it in the ground.” We have witnessed this troubling trend across North America from the Keystone XL expansion in the Midwest, to the Constitution Pipeline in New York State, to the Bayou Bridge Pipeline in Louisiana.

Oftentimes, despite having completed and received applicable federal, state and local construction permits, projects face an uncertain future because of the antics of environmental activists, coupled with the actions of complicit courts.

This attempt by fringe-environmentalists to “kill the heart by cutting the veins” is the new normal for companies seeking to invest in energy development and related infrastructure across our energy-rich continent. But, in order to limit our reliance on foreign energy, it’s imperative that governments provide private investment with the regulatory certitude it needs to work.

When building energy infrastructure — specifically pipelines — companies invest hundreds of millions of dollars in siting, permitting, and meeting with nearby residents, key stakeholders and government regulators. Only after months and sometimes years of studies and consideration will local, state, and federal regulatory bodies approve these lines for construction. But now we’re seeing that these approvals aren’t enough.

In Pennsylvania, for example, just three weeks after the state Public Utility Commission agreed to allow the Mariner East 1 line to resume operations, an activist administrative judge shut it down — overruling the body she reports to. And few can forget the political challenges the Dakota Access Pipeline (DAPL) faced for months after it was more than 99 percent complete and had received its required state and federal permits.

However, on June 1, the Dakota Access Pipeline will mark its first anniversary of safe operations having shipped more than 100 million barrels of oil from the Bakken to refineries in the U.S. helping to bolster local economies and reinforce America’s march toward energy independence. The line has helped push North Dakota’s oil output above 1 million barrels per day with more than 14,450 producing wells, the highest on record.

This remarkable output is seeding economic growth in the country’s second-largest oil producing state. North Dakota boasted 2.6 percent unemployment in April, the third lowest in the country, which owes largely to the 80,000 jobs created from 2011 from 2015 by energy development in the Bakken reserve. With at least 2,000 positions available, rig operators are increasing wages, which in turn is attracting skilled workers from other states — not to mention businesses eager to meet demand for auxiliary goods and services.

Increased energy production from the Bakken has also provided immense tax revenues for the state and local communities, as North Dakota’s Legacy Fund surpassed $5 billion and state revenues are up $250 million this budget term, surpassing the state treasury’s expectations.

Pipelines are the safest, most environmentally friendly, and most cost effective way to transport the liquid energy that fuels economies here in the U.S. and abroad. And, as evidenced by the Dakota Access Pipeline, the tax revenues from these projects can be tremendous.

But as radical activists become more emboldened to protest pipeline projects — even resorting to acts of domestic terrorism — companies and banks may be less inclined to invest the billions of dollars needed to bring them online without assurances from the government. Energy infrastructure is among the most regulated sectors of our economy, those regulations should ensure that — when appropriately met — these projects are allowed to move forward.

The narrow mindset of a rogue local government in Canada could have been a travesty for operators in the oil sands, construction workers along the line, the Canadian economy, and the nation’s tax revenue. However, the assertive action of the Trudeau administration provides a needed reprieve to the energy sector of the country and, similar to President Trump’s decisive actions in the early days of his presidency, demonstrate to protesters and investors alike that North American political leaders support the development of the continent’s natural resources to the benefit of its citizens.

• Craig Stevens, a former senior adviser to Energy Secretary Sam Bodman, is the spokesman for Grow America’s Infrastructure Now.