Rebel forces in Libya entered Tripoli on Sunday with weak resistance, captured Col. Moammar Gadhafi's two sons, and gained control of most of the Libyan capital. If the rebels are victorious in gaining control of the country, oil prices could fall as worries lessen over Libya's future, formerly the 14th largest oil exporter. For oil supply, however, it could be years before rebels are able to get production back to its previous level.

Review
The situation in Libya started in February of this year after the arrest of a human rights activist sparked violent protests in the city of Benghazi, which then spread across the country. Libyan ruler Moammar Gadhafi used aircraft to attack protesters, leading to further unrest. In March, the U.N. Security Council authorized a no-fly zone over Libya and began air strikes to protect civilians and support rebels. Oil production that had been near 1.6 million barrels per day has fallen to near nothing as companies such as Eni (NYSE: E), ConocoPhillips (NYSE: COP), and Total (NYSE: TOT) had to stop operating in the country. The rebels capturing Tripoli is good news for oil output, but chaos could continue for a while.

Oil prices
Europe was particularly hard hit by the drop in Libyan production since more than half of Libya's production makes its way to the continent. Analysts speculate the chaos in Libya had added a premium of $10 to $15 a barrel to Brent crude futures, the benchmark for European oil prices. The Brent price hit a high of $126.65/BBL in early April but has been falling with the release of strategic reserves in June and as worries rose over slowing economic growth. The Brent futures contract is now trading at $107/BBL, down 1.5% in morning trading.

Oil supply
While prices may fall in the near term from the psychological effect of less uncertainty, the impact of rebels gaining control will be limited in the short run as supply takes time to come back online. As I've shown before, it can take years for a country that's gone through chaos to come back to full production.

In any war-like situation, you might expect pipelines, wells, and other necessary infrastructure to be destroyed. However, the damage is much broader. The "brain drain" of experienced workers fleeing the country is a large factor in the loss of production. Skilled workers aren't apt to quickly return, and replacements are hard to come by for a country that has just (in the past five years) gone through chaos. Roughly half a million people, or 7% of the population, have left Libya since the crisis began in February.

Oil production that had been near 1.6MMB/D has fallen to near nothing as chaos reigned. The rebel-controlled Arabian Gulf Oil Co. says it could restart up to 180,000 barrels a day in two or three weeks once security is guaranteed. However, oil consultancy Wood Mackenzie estimates it will take three years for the country to recover its full production capacity, an estimate that looks optimistic compared to the historical record.

Who's it good for?
This is clearly good news for Italian oil company Eni, which has the largest operations in Libya (besides the Libya's national oil company) at 270,000 barrels of oil equivalent per day. The stock is up 7% in morning trading. Total and ConocoPhillips also have operations in Libya and both are up 3% and 0.5%, respectively. Among non-majors, this is good news for Hess (NYSE: HES) and Marathon (NYSE: MRO), both of whose production have been affected.

Foolish bottom line
With a rise from $96 to $120 in four months, it's amazing how fast geopolitical turmoil can affect oil prices. We're currently keeping an eye on the situation in Iran and Saudi Arabia as the source of the next huge oil spike.

With situations like this in mind, The Motley Fool has created a new special oil report titled "3 Stocks for $100 Oil," which you can download today, absolutely free. In this report, Fool analysts cover three outstanding oil companies, including the stock Fool analyst David Lee Smith calls the "energy king." To get instant access to the names of the three oil stocks, click here -- it's free.