America's oil boom has put a serious dent in the country's reliance on foreign oil.

Not long ago, the idea of the U.S. achieving energy independence seemed far-fetched. America's vast energy needs have long been met by oil imported from foreign powers, some of whom clash with American interests and ideals. It was apparent during the crippling Arab oil embargo on the U.S. during the 1970s, an era symbolized by motorists lining up at the pump and a dramatic increase in gasoline prices.

But the shale oil and gas revolution of the last couple of decades has made the improbable goal of American energy independence close to reality. Analysts at Raymond James recently predicted the U.S. will be "tantalizingly close" by 2020, as long as oil prices and domestic production rebound.

"The U.S. will be a much smaller importer of oil in the future than anybody thought was possible a decade ago," said Jason Bordoff, a Columbia University professor and former energy policy adviser to President Obama.

Energy independence has been a major promise of politicians for decades, with Donald Trump joining that trend. In May, Trump promised "complete" independence from foreign sources of oil, saying: "Imagine a world in which our foes and the oil cartels can no longer use energy as a weapon. Wouldn't that be nice?"

Ironically, the historic oil boom that President Obama has presided over is what makes that dream achievable today.

Related: America's biggest oil boom came under Obama

As recently as 2005, the U.S. relied on imports to meet 65% of daily oil demand, according to the U.S. Energy Information Administration. That figure shrank to 55% in 2010, and as low as 28% last year, as surging domestic oil production hit a 43-year high.

By 2020, Raymond James believes the U.S. will import just 11% of its daily oil needs. At that point, net imports could be met entirely by supply from Canada and Mexico.

"This would be North American oil independence, with no reliance on imports from outside the continent," Raymond James analysts wrote.

Of course, all of these predictions must be taken, keeping in mind that they hinge on predictions of future demand and oil prices, both of which are notoriously difficult to predict.

The EIA is cautious, providing two scenarios.

Under its baseline scenario, the U.S. wouldn't become energy independent through 2040, though it would get pretty close.

However, if shale production accelerates, thanks in part to more rapid technological improvements, the EIA projects the U.S. would become a "net petroleum exporter by 2024." If oil prices rise sharply, surpassing $100 a barrel in the next few years, the EIA thinks the U.S. could achieve complete energy independence by 2022.

To be sure, energy independence does not mean import free. The U.S. may not need to import any barrels, but it would still do so because some American refiners are configured to process the heavier crude common overseas.

Related: U.S. has more untapped oil than Saudi Arabia

Regardless, oil prices have already fallen by more than half in the last two years. So, has the recent oil crash slowed the march towards energy independence?

"On the one hand, low price periods decrease the incentive for pumping," said Thomas O'Donnell, senior energy analyst at Wikistrat. "On the other hand, low prices push (improvements in) technology, (which is) one thing the United States is very good at."

Squeezed by cheap crude, American oil companies have leaned on innovation to become dramatically more efficient. Those gains will endure, even when prices rise.

"The technology of Silicon Valley has come to the oil patch," O'Donnell said.

The oil boom tells only one part of the story, though. The push for energy independence has also been aided by a move towards higher fuel efficiency, which has slowed oil demand growth in the U.S. The Obama administration has pushed auto makers to make vehicles guzzle less gas in an effort to limit carbon emissions.

Related: Nervous OPEC calls for unscheduled meeting

So what would energy independence mean? For starters, it would signal greater economic activity in the U.S., something Trump has heralded.

It could also translate to more foreign policy flexibility for future American presidents who may not feel as beholden to oil producing countries in the Middle East, and elsewhere.

"The more oil produced by the greater number of countries, the less leverage that certain countries who behave badly have," said O'Donnell.

But energy independence doesn't mean U.S. oil prices will completely decouple from global prices. That's because unlike in the 1970s, today's energy market is truly global. An outage in Canada can impact prices in Kuwait because it affects the global supply of oil.

"We can't escape the global market. It's very unlikely that we'll have an island effect," said O'Donnell.