Iraqi Prime Minister Nouri al-Maliki has called on his countrymen to take up arms and defend the nation regardless of which sect they belong to in a tough address to army officers broadcast on state television.



Maliki spoke to the officers in the city of Samarra on Friday and told them that volunteers were arriving to help defeat Sunni rebels who have this week swept through mainly Sunni territory towards Baghdad.

"We are not sectarian, we will fight as a nation," Maliki said in the speech, which was shown on state television on Saturday.



"We will talk the language of justice, we will talk the language of freedom, we will talk the language of all Iraqis regardless of their sect."



Maliki said the cabinet had granted him unlimited powers to confront the fighters from the Islamic State in Iraq and the Levant (ISIL) and associated Sunni rebel groups.



"Samarra will not be the last line of defence, but a gathering point and launchpad," Maliki told officers in the city, which lies about 125km north of the capital on the road to rebel-controlled Mosul.



"Within the coming hours, all the volunteers will arrive to support the security forces in their war against the gangs of ISIL, Maliki, who leads the Shia-dominated government, said. "This is the beginning of the end of them."





Grand Ayatollah Ali al-Sistani, Iraq's most influential Shia cleric, had also urged people on Friday to take up arms and defend the country.



During his trip to Samarra, Maliki visited a revered Shia shrine that was bombed by Sunni fighters in 2006, an attack which touched off sectarian bloodletting that killed tens of thousands of people.

Iran and US

In a separate development, Iran could contemplate cooperating with the United States on restoring security to Iraq if it saw Washington confronting "terrorist groups in Iraq and elsewhere," Iranian President Hassan Rouhani said on Saturday.



Rouhani, a relative moderate who has presided over a thaw in Iran's relations with the West, added that Tehran stood ready to provide help to Iraq within the framework of international law, but so far Baghdad had not requested such assistance.



Shia Muslim Iran has been alarmed by the seizure of towns not far from the Iranian border.



"We all should practically and verbally confront terrorist groups," Rouhani told a news conference broadcast live on state television.



US officials said there were no contacts going on with Iran over the crisis in Iraq.