An al Qaeda splinter group occupied Iraq's second biggest city -- Mosul -- and threatened to head south towards Baghdad. The group is trying to establish an Islamic state straddling the Iraq-Syria border.
Iraq produces about 3.3 million barrels of oil a day, making it the second biggest producer in OPEC after Saudi Arabia. It is also sitting on the world's fourth largest proven reserves.
The immediate impact of the insurgents' territorial gains on oil pricesis likely to be limited, however.
Exports from the country's northern oil fields had already dwindled to a trickle since early March after attacks closed a pipeline carrying crude to the port of Ceyhan on Turkey's Mediterranean coast.
And much smaller volumes of exports by road to Jordan have also been halted by the violence.
Still, Iraqi exports rose in April to about 2.5 million barrels per day as shipments from the country's main oil producing region in the south hit a record high, according to the International Energy Agency.
The upsurge in violence will keep a lid on exports from the north, but some experts say overall shipments from Iraq could rise further this year, driven by new production coming on stream in the south.
"Despite violence in the north, Iraqi exports based entirely on production from the southern fields are likely to hit a record 2.8 million [barrels per day] by the end of 2014," noted Ayham Kamel, Middle East and North Africa director at Eurasia Group.
The longer term impact is harder to gauge.
The insurgents could use techniques acquired in battle with the Syrian government to attack more oil facilities in the north, and the deteriorating environment could undermine new investment by international oil companies, Kamel added.