The United States, which is mulling air strikes against the insurgents, said it believed Baghdad's security forces were rallying against the assault, while Iran pledged not to let Shiite shrines in Iraq fall to the Sunni Arab militants leading the charge.
Washington has nevertheless deployed some 275 military personnel to protect its embassy in Baghdad, the first time it has publicly bolstered the mission's security, while other countries have also sought to evacuate nationals and pull diplomats out.
The crisis, which has displaced hundreds of thousands of Iraqis, threatens to carve up the country while the assault on the Baiji oil refinery early Wednesday will likely further spook international oil markets.
From about 0430 IST, clashes erupted at the refinery complex in Salaheddin province, north of Baghdad, according to a senior official and a refinery employee.
Some stores of oil products caught fire during the assault on the facility, Iraq's biggest refinery.
Officials told AFP a day earlier that the refinery had been shut down and many employees evacuated because, due to the militant offensive that has seen swathes of northern territory slip from government control, several major cities were no longer being supplied with refined oil products.
World oil producers have cautiously watched the unfolding chaos in Iraq, which currently exports around 2.5 million barrels of oil per day, but have thus far stressed that the country's vast crude supplies are safe -- for now.
"The oil infrastructure as well as major production facilities are mostly concentrated in the south with terminals at Basra operating as normal," VTB Capital analyst Andrey Kryuchenkov told AFP.
Kryuchenkov cautioned however: "The situation remains very tense and highly uncertain."
In a bid to see off the militant offensive, Prime Minister Nuri al-Maliki sacked several top security commanders on Tuesday evening, and then stood alongside several of his main rivals in a rare display of unity among the country's fractious political leaders.
Among those fired was the commander for the northern province of Nineveh, the first region to fall in the onslaught, which began on June 9.
Maliki also ordered that one officer face court martial for desertion.