Iraq’s premier vowed Wednesday to “face terrorism” and insisted security forces had suffered a “setback” rather than defeat, as militants pressing a major offensive attacked the country’s largest oil refinery.

The militants also seized three villages in north Iraq Wednesday, an Iraqi official said, while India said 40 of its nationals had been kidnapped in Mosul city, overrun last week by the insurgents.

He also said that the country’s security forces, which wilted in the face of a major militant offensive that in a matter of days overran all of one province and chunks of three more, had suffered a “setback” but had not been defeated.

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.

The attack on the refinery complex, in Salaheddin province north of Baghdad, was launched before dawn, according to a senior official and a refinery employee.

They said some tanks containing refined products caught fire and that the Iraqi security forces had suffered casualties.

Maliki’s security spokesman, Lieutenant General Qassem Atta, later said that Iraqi forces had repelled the attack in fighting which left 40 militants dead. He did not mention security force casualties.

The refinery was shut down and most employees evacuated on Tuesday due to a drop in demand caused by the militant drive, which is being spearheaded by jihadists from the Islamic State of Iraq and the Levant (ISIL).

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 stressed that the country’s vast crude supplies, mostly in the south, are safe — for now.

– Fighting in Tal Afar –

Further north, Iraqi security forces pushed into new areas of Tal Afar on Wednesday during heavy fighting with militants, a provincial councillor said.

The Shiite-majority town is located in Iraq’s Nineveh province along a strategic corridor to Syria and has been the scene of fierce fighting between security forces and militants for days.

But militants gained ground elsewhere, with a senior police officer saying they had moved into the Shiite Turkmen area of Bashir in the northern province of Kirkuk early on Wednesday.

The insurgents also seized three villages in Salaheddin province during clashes with security forces and residents that left 20 civilians dead, a local official said.

The official named the villages as Albu Hassan, Birwajli and Bastamli.

The foreign ministry in New Delhi, meanwhile, announced Wednesday that 40 Indian construction workers had been abducted in Mosul, the first city to fall after the militants launched their offensive on June 9.

The Times of India earlier reported that the workers mostly from Punjab state had been kidnapped by the militants during an evacuation of the Mosul area.

Akbaruddin said 46 Indian nurses were also stranded in Iraq waiting for the turmoil to subside.

ISIL fighters kidnapped 49 Turks including diplomats and children from the Turkish consulate in Mosul on Wednesday last week, after earlier seizing 31 Turkish truck drivers.

In a bid to see off the militant offensive, 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.

Maliki also ordered that one officer face court martial for desertion.

The dismissals came after soldiers and police fled en masse as insurgents on Tuesday last week swept into Mosul, a city of two million that is capital of Nineveh province.

Some abandoned their vehicles and uniforms when faced with the insurgents, which are led by ISIL fighters but also include loyalists of executed dictator Saddam Hussein.

After taking Mosul, militants captured a major chunk of mainly Sunni Arab territory stretching towards the outskirts of the capital.

– ‘Stiffening resistance’ –

Despite the early poor performance of the security forces, Pentagon spokesman Rear Admiral John Kirby said Iraqi troops, with help from Shiite volunteers, were “stiffening their resistance” around Baghdad.

Washington has already deployed an aircraft carrier to the Gulf, but President Barack Obama has insisted a return to combat in Iraq for US soldiers is not on the cards.

Secretary of State John Kerry has, however, said that drone strikes could be used.

With regional tensions rising, Iranian President Hassan Rouhani said Wednesday the Islamic republic “will do everything” to protect Shiite shrines in Iraqi cities against the militant assault.

And Saudi Arabia warned of the risks of a civil war in Iraq with unpredictable consequences for the region.