The Trump administration approved a permit for the controversial Keystone XL project Friday morning — a whopping 3,108 days after Trans-Canada first applied to the State Department to build the cross-border pipeline.

Commence the gnashing of teeth from green activists who grew accustomed to getting their way under the Obama administration. The environmental left constantly decries the GOP as anti-science, but it’s their own claims about Keystone XL’s supposed risks to public safety and the environment that have proven unfounded.

Environmentalists like to tout scary spill statistics. But in actuality, oil travels most securely by pipeline, reaching its destination safely 99.999 percent of the time, according to the Association of Oil Pipe Lines and the American Petroleum Institute.

A recent study by Canada’s Fraser Institute provided more reassuring information: Of the rare spills that do occur, 83 percent happen in facilities specially equipped to handle them, not along the pipeline’s route, where they could cause environmental harm. Moreover, 70 percent of the spills that do occur amount to a total of less than a cubic meter of spilled oil.

Compare that when oil travels by the alternatives.

As energy-related rail traffic increased, 2013 alone saw more train-related crude-oil spills than the entire 37 years prior, combined. And between 2013 and 2015 alone, the United States and Canada saw 10 separate explosions involving oil-laden trains.

To understand how much riskier railway transportation can be, look no further than to Lac-Mégantic, Quebec. In 2013, a crude-oil train derailed, plowing into town at more than 62 miles per hour and exploding. Forty-seven people died, and the blaze wiped out 44 buildings.

The wreck unleashed nearly 1.5 million gallons of oil, and what didn’t char the town seeped into the soil and contaminated the nearby Chaudière River.

Transporting oil by truck also carries major risks. At the peak of the oil boom, The New York Times reported that highway fatalities were the top cause of deaths in the industry — more than 300 between 2002 and 2012. In North Dakota, highway fatalities skyrocketed as energy production soared; at one point, a person was killed in an accident every two-and-a-half days.

A 100 percent risk-free method of energy transportation doesn’t exist, and the Obama administration was well aware of the comparative risks of pipeline, rail and road. Five separate State Department studies examined safety and environmental concerns surrounding the pipeline. Their findings were consistently favorable to Keystone XL.

The most recent State Department report concluded that because of pipelines’ superior safety record, Keystone XL could prevent as many as six fatalities and 48 injuries each year.

In reality, opposition to Keystone XL isn’t about what’s safest or most environmentally prudent right now. Activists have a bigger agenda: By making it a hassle to transport energy, they hope to keep oil trapped in the ground.

It’s a flawed strategy. The State Department reported that oil would be extracted from the Alberta tar sands — Keystone’s primary crude source — whether or not Keystone XL was approved.

But without the pipeline, the oil would travel by rail and road, which are far more carbon-intensive means of transportation. Failure to build Keystone XL would, according to the Obama State Department, increase carbon emissions by 42 percent.

The same naysayers spreading unscientific alarmism about Keystone XL’s safety and environmental impact have downplayed the pipeline’s economic benefits, noting that only 50 permanent jobs will be created.

This dismissive attitude hasn’t played well with America’s blue-collar workers, who have endured years of economic misery. Construction workers, well-accustomed to temporary labor, crave the thousands of union jobs Keystone XL will create. Supporting industries, too, are excited about the estimated 42,000 jobs directly and indirectly supported by the pipeline’s construction.

Approving Keystone XL has always made economic and scientific sense. President Trump has discovered it makes political sense, too. Better late than never.

Jillian Kay Melchior is a senior fellow with the Independent Women’s Forum.