Oil prices spiked 8 percent last week, with the price of West Texas crude oil climbing close to the $50 a barrel range after having fallen to a six-year low of $38.51 in August, dragged down by the strong dollar, increased production and a global economic slowdown.

Analysts are divided on whether the rally can last. Goldman Sachs told clients that the fundamental market picture has not changed — and that the glut of oil will continue, with foreign producers making up for declining U.S. production. A month ago, Goldman predicted that oil prices could fall as low as $20 a barrel and could stay low for years.

On the other hand, Phil Flynn, senior energy analyst at The PRICE Futures group, predicts that "in the long-term, high prices could be here to stay and some of the bearish arguments are falling flat right now."

Here are five key factors that will drive oil prices higher, according to Flynn:

1. The main reason for the rise in prices last week was the announcement by OPEC Secretary General Abdalla Salem el-Badri that global investment in oil projects would drop by 22.4 percent this year, leading to lower supply before long. The International Energy Agency expects a similarly sized drop, with Fatih Birol, head of the agency, calling it "the highest drop in history."

"This has been our base case for maintaining our bullish outlook for oil," Flynn wrote earlier this week. "We have said that the historic drop in oil rig counts, capital spending, and energy projects we are laying the groundwork for a future spike in price."

2. Even though there's been a big buildup in inventories, there are signs that U.S. crude oil production is beginning to decline. The U.S. Energy Information Administration said in its short-term energy report that total production fell by 120,000 barrels a day from August to September. By next year, the EIA expects production to drop from the 2015 average of 9.2 million bpd to 8.9 bpd next year, causing a drawdown on U.S. oil supplies and upward pressure on prices.

3. Major oil producers, including OPEC nations as well as Venezuela and Russia, are planning to meet on Oct. 21 to discuss production concerns. This could result in even more production cuts amid concerns about falling demand. "I don't think people realize what an impact this could have," Flynn argues. "Maybe not today, maybe not tomorrow, but in the future."

4. The meeting minutes of the Federal Open Market Committee released Thursday show that the Fed is on the fence about raising rates. While officials want to raise rates by the end of the year, the guideposts they're using don't make it likely that they'll be able to, says Flynn. If the Fed does decide to raise rates, it'll be more expensive for oil production companies to finance projects such as opening new oil reserves, causing production to remain at lower levels. (Bears counter that if the Fed holds off, it would be a sign of a shakier global economy that isn't strong enough to substantially increase demand for oil and thus sustain higher prices.)

5. When the Iran nuclear deal was reached a few months ago, the anticipated return of Iranian oil to the world market caused a drop in oil and gas prices. But recent conflict within the Iranian parliament and comments by Iran's Supreme Leader Ayatollah Ali Khamenei, who said he has banned any further discussion between Iran and the U.S., might mean that sanctions stay in place for longer than originally expected and that, for political or other reasons, Iran might not ramp up production as quickly as first thought.