Iraq's Sunni insurgents are targeting its main northern oil pipeline, undoing plans for a massive increase in exports as violence reaches levels unseen since the darkest days of civil war.
Iraq's ambitious plans to ramp up its oil output have been held back by poor maintenance and technical problems.
Violence is making the situation worse, and, if it continues to escalate, could have a measurable impact on global supply.
Death tolls for the past three months in Iraq have been the highest for five years, since the days when rival Sunni and Shi'ite militias fought for control of neighbourhoods and battled 170,000 U.S. troops.
Today, the Americans are long since gone, but sectarian animosity has re-emerged, fuelled by resentment among Sunni Muslims at what they perceive as domination by Prime Minister Nouri al-Maliki's Shi'ite majority.
This week insurgents staged possibly their boldest attack in years, freeing hundreds of prisoners in coordinated strikes on two jails that killed dozens of troops.
That tactical sophistication is also being turned against Iraq's oil exports, hurting plans to turn the country into the world's biggest new source of traded oil and raise the money to rebuild after decades of sanctions and war.
"It is government crude for Sunni blood," said Abu Ammar, a Sunni tribal leader in southern Nineveh province, where a stretch of the main Kirkuk oil pipeline has repeatedly come under insurgent attack.
"The Baghdad government should understand this message: stop spilling our blood and we'll stop attacking the oil pipeline," he told Reuters.
"The Shi'ite government is killing and persecuting Sunnis in all parts of Iraq. As revenge we have to make the government suffer, and the best way is to keep blowing up the oil pipeline."
According to oil shipping figures tracked by Reuters, Iraq's oil exports have fallen this month to just 2.27 million barrels a day, a fifth below the government's target of 2.9 million bpd this year.
Iraq has ambitious plans to increase oil exports as high as 6 million bpd after decades when production was held back by sanctions and war.
Its exports reached 2.62 million bpd last November, the highest level in decades, but progress has since been reversed.
The total has been kept down in part by technical problems that have little to do with security, especially in Basra, the southern port where few Sunnis live.
An official at the South Oil Company said on Thursday Iraq will have to cut its exports in Basra by 400,000-500,000 barrels per day in September for maintenance.
But one of the main reasons for the fall is the damage inflicted by insurgents to the Kirkuk pipeline, constructed in the 1970s to bring 1.6 million barrels of oil per day to the Turkish Mediterranean port of Ceyhan.
A bomb attack on June 21 kept the pipeline closed for much of July. A repair crew sent to fix the damage was ambushed by gunmen who killed two engineers and two police.
In the end, Kirkuk oil shipments for this month averaged just 150,000 bpd, less than a tenth of official capacity.
"Bomb attacks and leakages due to corrosion have made the pipeline unfit to handle steady shipments from northern oilfields," a senior official with Iraq's state-run North Oil Company told Reuters.
"The deterioration of security in areas where the line stretches has made it impossible for our crews to repair damage in time as we used to. Now it takes ages," said the official.
"In recent meetings we told the oil ministry that Kirkuk's major export pipeline is now suitable for watering gardens and not for carrying oil."
A former official in Iraq's oil industry said the incidents were familiar from the dark days of Iraq's sectarian civil war.
"It seems like we are going back to the 2006-2007 environment where the pipeline was halted for months on end," the former official said.
"The attacks are deliberate: the aim is to stop Kirkuk from flowing."
Although sources differ on the precise numbers of casualties, at least 2,500 people have been killed in Iraq in the past three months, mostly by bombings that target security forces, worshippers in mosques and ordinary people.
According to U.N. figures, the death toll for the month of May surged above 1,000 for the first time since mid-2008, when U.S. and Iraqi troops launched an offensive to recapture swathes of territory still in the grip of warring sectarian militias.
The last five years saw a gradual decline in violence in Iraq after U.S. forces pulled out at the end of 2011.
Iraq touted plans to ramp up its oil production and earn funds for reconstruction. Last year its output surged. But Maliki's Shi'ite-led government never managed to win over the support of Sunnis, the minority that ruled under Saddam.
A fragile political system has come close to unravelling this year, with Sunnis staging mass demonstrations against the government, accusing it of marginalising them.
Civil war in neighbouring Syria along the same sectarian lines as in Iraq has emboldened Sunni militants, including Iraq's branch of al Qaeda, which merged with a powerful Syrian rebel force.
The combined group claimed responsibility for this week's Iraq prison attack. "The prospects of a descent into civil war along the lines of the violence that dominated Iraq in 2006-07 are very real," wrote security consultancy Eurasia Group in a research note two weeks ago.
That note still said the deployment of government forces in Sunni provinces would probably be sufficient to prevent Sunni insurgents from developing "forces that can engage government units directly".
But Monday's subsequent attack on the prisons suggests the assessment may be optimistic.
Suicide bombers drove cars packed with explosives to the gates of Abu Ghraib prison on the outskirts of Baghdad on Sunday night and blasted their way in, while gunmen attacked guards with mortars and rocket-propelled grenades.
Other militants took up positions on a highway and fought off troop reinforcements. A similar attack was staged simultaneously at another prison north of the capital.
The two attacks killed at least 26 soldiers. Some 500 prisoners, mainly Sunni militants, escaped.
"The situation is definitely deteriorating and we're seeing attacks on a scale we haven't seen since late 2007," said John Drake, an Iraq analyst at AKE, a consultancy that advises oil companies and other firms with exposure to Iraq.
"If they can successfully attack a prison, it's going to be important to keep other essential facilities - including oil facilities - safe."
By Ahmed Rasheed and Ziad al-Sanjary with additional reporting by Peg Mackey, Alex Lawler, Peter Apps and Peter Graff; Writing by Peter Graff; editing by Janet McBride.