A customer pumps gasoline into his car at a service station in San Francisco. Getty Images

Oil prices have broken out of a "sweet spot" for global economic growth and could herald a U.S. recession if they keep rising, UBS warns. The Swiss investment bank on Tuesday joined a chorus of financial institutions in pondering the economic impact of oil prices at $100 a barrel. Crude futures are trading near their highest levels in 3½ years, bolstered by strong demand, supply cuts from big producers, and mounting geopolitical tension in the Middle East and Venezuela. International benchmark has surged nearly 48 percent over the last year and has traded above $80 a barrel. Meanwhile, U.S. crude is up 43 percent, near $72 a barrel.

We should take seriously the possibility of an oil price spike ... not least because oil spikes preceded 5 of the last 6 recessions (in the US). UBS

When oil prices rise sharply, it raises the cost of fuel and shrinks the amount of money consumers have to spend in the broader economy. But when the cost of crude falls too much, it weighs on growth in oil-producing nations. Until recently, oil prices fell in a range between those two poles, according to UBS. "However, now that we are getting closer to $100/bbl the net impact of higher oil prices is again becoming a net negative," UBS economists said in a research note. "The global sweet spot — where oil prices may have positively contributed to global growth — seems to be somewhere between $50/bbl and $70/bbl." Oil prices at $100 a barrel would knock UBS' estimate for global growth in 2019 down from 4 percent to 3.86 percent. It says global inflation would top out at 4 percent if prices hit that level, up from the bank's current forecast for a 3.1 percent increase in consumer prices in July. To be sure, those economic impacts would be felt very differently across the globe — UBS assessed the fallout for 15 different nations — but it certainly raises risks in the United States. "We should take seriously the possibility of an oil price spike ... not least because oil spikes preceded 5 of the last 6 recessions (in the US)," UBS said.

The crude price rally this past year marks the 11th biggest oil price spike in the last 70 years, according to UBS. The bank's economists warn the rally could continue to grind higher for several reasons. A deal among OPEC, Russia and other producers to cut output and drain a crude glut has shrunk oil stockpiles. Meanwhile, geopolitical tension and U.S. sanctions on Iran and Venezuela are creating uncertainty about future oil supply. Finally, while U.S. production is surging, it can't keep pace with growing demand, and UBS thinks underinvestment in big oil projects will start to impact supply next year. While this year's spike ranks among the biggest in history, UBS notes that it is still smaller than rallies that preceded recessions in the past. Global oil prices also remain below levels throughout much of 2005-2015, once they're adjusted for inflation. Fuel efficiency improvements also mean the world needs less oil today to produce one unit of economic activity. Another factor that would minimize the impact of higher oil prices is surging U.S. output. Now that the United States accounts for a bigger share of global oil production, it means that the world's biggest economy gets a bigger boost from rising oil prices. Still, UBS says another $20 rise in oil prices won't bring much new production online.

WATCH: Why $80 oil not out of the question