When South Sudan won independence from Sudan in 2011, oil was seen as a potential spark that could reignite tensions and cripple the new nation. But today, oil is motivating efforts to save it.
The precious commodity is pushing South Sudan's neighbours and biggest foreign backers to help end a month-old conflict between the government and rebels.
China has cast aside a long-standing policy of non-interference and is backing peace talks. Sudan has overlooked decades of animosity in favour of supporting the South's government. Kenya, too, has tried to stop the bloodshed.
At stake is one of Africa's most-lucrative deposits of oil, generating billions of dollars for the world's youngest nation and its partners.
"The big powers, especially the Chinese, have a huge stake in this," said Leben Moro, a professor at the Centre for Peace and Development Studies at the University of Juba in South Sudan's capital. "The oil could be a saviour, but if there is more fighting over the oil, it could become a curse."
A dispute over political power, not oil, triggered clashes in Juba last month. But the conflict quickly turned into a fight over South Sudan's strategic oil-rich regions. The capitals of two of these areas, Bentiu and Malakal, have changed hands more than once. Battles also have been fought in Bor, the capital of a region with potentially lucrative untapped oil reserves.
"The opposition hopes that by capturing the oilfields, they'll gain the upper hand in ceasefire negotiations by halting the government's main source of income," said Luke Patey, from the Danish Institute for International Studies. "Oil is the prize at the conflict's end."
Oil output has dropped more than 20 per cent since the conflict began as rebels have seized vital, oil-producing regions. China, which has invested billions in South Sudan's oil infrastructure, has been forced to shut down operations in some areas and evacuate scores of Chinese workers.
Sudan earns hundreds of millions of dollars in fees annually by allowing landlocked South Sudan's oil to flow through pipelines to northern refineries and ports. With Sudan already suffering economically from US sanctions and a loss of oil revenue since the creation of South Sudan, further drops in oil output could prove devastating.
Kenyan officials, including President Uhuru Kenyatta, have urged both sides to enter peace talks. The Nairobi government hopes that a planned southern oil pipeline will one day transport crude from South Sudan to the Kenyan port of Lamu, generating large fees. The country has also discovered its own oil not far from the border with South Sudan.
Uganda, which has sent troops and air support to South Sudan's government, has aspirations for its own oil reserves and fears that an unstable South Sudan could drive investors away from the whole region.
South Sudan depends on oil for 98 per cent of its revenue, and a prolonged conflict could bankrupt the country and bring more chaos.
"South Sudan was born as a petro state," said Daniel Large, an analyst at Central European University in Budapest. "Without oil, in terms of paying for the state, there will be huge repercussions."
Despite its oil, South Sudan remains one of the world's least-developed countries, reliant on hundreds of millions of dollars in annual aid from the US and its allies.
However, much of the revenue has been squandered, and President Salva Kiir acknowledged in 2012 that corrupt officials had stolen $4bn (£2.4bn) in oil revenue from government coffers.
The International Crisis Group says the death toll in South Sudan is close to 10,000. More than 400,000 have fled their homes, and an additional 73,000 are refugees in neighbouring countries.
Diplomatic efforts in the Ethiopian capital, Addis Ababa, appear to be delayed, if not stalled.
Before the crisis, South Sudan was producing about 220,000 to 240,000 barrels of oil per day, with roughly two-thirds heading to China.
So Beijing sent its foreign minister, Wang Yi, to Ethiopia to attend the talks. He urged both sides to cease hostilities and reportedly even offered to help mediate. But analysts caution that China could have little influence in what is largely a domestic tussle between Mr Kiir and his former deputy, Riek Machar.
Sudan's government fought two brutal civil wars with the rebels of the Sudan People's Liberation Movement (SPLM), who now make up South Sudan's ruling party.
In the 1990s, Mr Machar aligned himself with the north after a split in the rebel movement, then later rejoined the SPLM before a 2005 peace deal ended the civil war.
Mr Kiir and other SPLM leaders always viewed Mr Machar's alliance with Khartoum as a betrayal.
When the current crisis began, many South Sudanese officials and analysts thought Sudan might intervene on Mr Machar's side. Instead, a high-level Sudanese delegation, including President Omar Hassan al-Bashir, flew to Juba to show support for Kiir and the peace process.
Sudan's government believes it is crucial to preserve its economic alliance with South Sudan.
It has faced intense criticism from hard-liners for giving up billions of dollars in oil revenue by agreeing to South Sudan's independence.
In September, protests erupted over the government's decision to stop subsidising petrol, which almost doubled in price. This is expected to rise further if the crisis shuts down more oil exports from South Sudan.
"The elite in Khartoum and the elite in Juba learned a lesson from the one-year shutdown of the oil [in 2012 over a royalties dispute]," Mr Moro said.
"For a while, they were working on the idea that the other one would collapse first, but they realised that both could collapse at the same time. Now, it seems they are more interested in collaborating for their joint survival."
In an interview, a spokesman for the rebels said their strategy is to take over the key oil-producing areas. The rebels control parts of Unity and Jonglei states and have vowed to reclaim Upper Nile state.
"These regions are the backbone of South Sudan's economic survival," said Gideon Gatpan Thoar, the rebel spokesman. "If we get control of all of them, we want the oil to flow. But we want to make sure the money from oil is not used to fuel this conflict.
"The money should be placed in a reserve account until the crisis is finished, so it can be used for the people of South Sudan."
Even if the crisis ends soon, South Sudan could face a "huge reputational shock", Mr Large said.
"The violence and instability could discourage investors in the industry for years, or even decades.
"This isn't the best attraction for huge investments in South Sudan's oil industry," he said.
(c) The Washington PostReuse content