As giant oil and gas discoveries have some of the world's biggest energy firms jostling for space in East Africa, the fate of one gas producer offers them a cautionary tale.
After investing $160 million in Tanzania, an offshoot of Canada's Orca Exploration (ORCb.V) is close to paralysis because of unpaid bills and quarrels with authorities over terms.
Its story highlights some of the obstacles facing much bigger players as they negotiate with governments that are learning the game as they go along and are keen to both bring investment quickly and make sure they do not get cheated long term.
The speed with which East African countries adapt could determine whether their region lives up to its reputation as the latest great oil and gas frontier, with big implications for global energy flows as well as regional economies.
On the face of it, relations between Orca's PanAfrican Tanzania and authorities in the East African country should work to everyone's benefit.
Its gas generates half Tanzania's electricity, saving it an estimated $1 billion a year on oil imports. When it started producing gas in 2004, it was hailed locally as just the sort of investment one of the world's poorest countries needed.
But things started to unravel in 2011 when a government audit led a parliamentary committee to accuse PanAfrican of cheating it out of $20m in revenues. Meanwhile, state power firm TANESCO, its biggest customer, stopped paying for gas.
Threats that went as far as criminal charges were quietly dropped when it turned out the missing funds were due to an accounting error, but then a new discrepancy was announced.
Although the parliamentary committee behind the accusations was disbanded and itself accused of corruption, the government said it still wanted to negotiate with PanAfrican on how gas revenue was shared, among other things.
Last month, Orca told shareholders the company still hadn't reached an agreement with the country's Minister of Energy and Mines and that it might need extra funding as things drag on.
One of the government negotiators, Gabriel Bujulu, principal petroleum engineer at the Tanzania Petroleum Development Corporation said simply: "It is premature to expect that a solution will not be attained."
Both Orca and PanAfrican declined further comment.
"NEW MIDDLE EAST"
Changes to terms by governments seeking more money are nothing new for resource companies, but no matter how well-intentioned, they scare executives and investors.
"As discoveries are made and it becomes clear the size of the prize you can start to see political pressures to change the terms after the fact," said GH Securities analyst John Malone, who studies East Africa's energy sector.
Recent gas finds off Tanzania and Mozambique have led to predictions the region could become the third largest exporter of natural gas on the planet.
It could have 28 billion barrels of oil, 440 trillion cubic feet (12 trillion cubic meters) of natural gas and 14 billion barrels of natural gas liquids, according to a recent assessment by the US Geological Survey.
Back of the envelope calculations at today's prices suggest the prize from oil and gas alone could be more than $9 trillion.
"We are becoming the new Middle East," proclaimed Kenya's energy minister Kiraitu Murungi after it licensed all its production blocks and began turning would-be investors away.
First, East African countries have to bring in the investment - convincing energy firms they are safe for the billions of dollars needed in light of other risks from political instability onshore to Somali piracy off the coast.
The scale of future projects would be in a different league to Orca's operations.
Companies with at least a stake in East African concessions include many of the world's biggest private energy firms, including ExxonMobil (XOM.N), Royal Dutch Shell (RDSa.L), Italy's ENI (ENI.MI), France's Total SA (TOTF.PA).
None of the officials, executives and industry analysts that Reuters spoke to expected East African states to pursue all-out energy industry nationalisation. Most thought there was a good chance they could move the goalposts.
That could scare other firms off, said Duncan Clarke, chairman of oil and gas consulting firm Global Pacific Partners.
"There's 150 countries they can be working in," Clarke said.
The trials of Britain's Tullow Oil (TLW.L), whipsawed by government demands in Tanzania's neighbour Uganda, make for another lesson for energy firms.
First, it had to pay an unexpected $300 million tax bill after its acquisition of rights. Now, it is at odds with the government over the size and economic feasibility of a refinery Ugandan officials want to process at least some of the crude.
All Uganda wants to do is secure the best deal for its people, Ugandan energy minister Irene Muloni told Reuters.
Although quick deals might get the money moving, there is a greater risk they will not give a country all it wants or raise accusations of corruption.
"We are not prepared for an expansion of exploration," Tanzanian opposition parliamentarian Kabwe Zuberi Zitto wrote on his blog, calling for a 10-year moratorium on issuing new exploration licenses.
Although officials in Mozambique say they are confident of their policy, critics say the latest 17-page petroleum law does not protect its economic or environmental interests well enough.
"They need to negotiate harder. They shouldn't be selling out," said Jenik Radon of Columbia School of International and Public Affairs, who has been advising the government.
Donors have urged both Mozambique and Tanzania to hold off on licensing more blocks for exploration until contracts are made transparent and better terms have been put in place.
Tanzania has enlisted help from Trinidad and Tobago - held up as an example of how a small country can get the best deal for its gas.
With elections over the next three years in both Tanzania and Mozambique, governments are also likely to feel pressure for more populist moves to squeeze foreign companies.
But regardless of the possible tangles for the world's oil firms, there will be many ready to take a chance, said Keith Hill, whose Africa Oil Cop. (AOI.V) is exploring in Kenya and the politically unstable Horn of Africa.
"No guts, no glory," he said.