Iraq's Prime Minister Nouri al-Maliki has resisted growing calls for his resignation and accused the country's new president of violating the constitution, plunging the government into political crisis as it battles the Islamic State group.

Shortly before his defiant speech on Sunday, Maliki deployed security forces and armed groups across the capital Baghdad, the AFP and Reuters news agencies reported.

"There is a huge security presence, police and army, especially around the Green Zone," a highly-protected district that houses Iraq's key institutions, a high-ranking police officer told AFP.

He said the deployment had started at about 10:30pm [1930 GMT], just 90 minutes before the speech.

Despite Maliki's announcement that he intended to run for a third-term as prime minister, a bloc comprising Iraq's biggest Shia parties is close to nominating a new prime minister, Reuters reported, citing the deputy speaker of parliament.

If that happened, Maliki would have to step aside.

Live Box 201461213304888167

This latest round of political infighting could hamper efforts to stem advances by the Sunni group, who have also seized a large swath of northern and western Iraq in recent weeks.

Despite minor victories by Kurdish forces, the Islamic State group continues to make rapid gains in Iraq. On Sunday the group seized the country's largest dam and advanced within striking distance of the Kurdish capital, Erbil.

In a nationally televised speech, Maliki said he would file a legal complaint against the new president, Fouad Massoum, for committing "a clear constitutional violation".

Maliki, whose Shia-dominated bloc won the most seats in April's elections, accused the Kurdish president of neglecting to name a prime minister from the country's largest parliamentary faction by Sunday's deadline.

He said President Massoum violated the constitution "for the sake of political goals".

Speaking on Iraqi TV for the first time since US forces launched air strikes and humanitarian airdrops in Iraq last week, Maliki said the security situation will only worsen as a result of Massoum's actions.

"The deliberate violation of the constitution by the president will have grave consequences on the unity, the sovereignty, and the independence of Iraq and the entry of the political process into a dark tunnel."

US air strikes

President Barack Obama warned Americans on Saturday that the new campaign to bring security in Iraq requires military and political changes and "is going to be a long-term project".

Live Box 201471121759854996

Just hours after Maliki's speech, the US State Department said it "fully supports" the new Iraqi president.

Following US air strikes against the Islamic State group in northern and western Iraq, Kurdish forces retook two towns, achieving one of their first victories after weeks of retreating, a senior Kurdish military official said.

The Kurdish Peshmerga were able to push fighters out of the villages of Makhmour and al-Gweir, about 45km from the Kurdish capital of Erbil, Brig Gen Shirko Fatih said.

In the Kurdish capital on Sunday, the president of the semi-autonomous Kurdish Regional Government, Massoud Barzani, said Peshmerga soldiers require more firepower to defeat the group.

Source: Agencies