Islamist militants claim to have massacred 1,700 Iraqi soldiers in the past week as photos emerge from the alleged executions in northern Iraq.

The images, which have not been verified, appear to have been posted on social media sites by Islamic State in Iraq and the Levant (Isis), which has in the last week taken control of large areas of northern Iraq including the cities of Mosul and Tikrit.

Caretaker Prime Minister Nouri al-Maliki has said he plans to launch a counter-offensive from the city of Samarra, 125 kilometres north of Baghdad and has urged people to take up arms and defend the country against the insurgents.

Isis, which grew out of an Al-Qaeda-linked organisation in Iraq, is estimated to have up to 5,000 fighters holding a territory stretching from the eastern side of Aleppo in Syria to Fallujah – less than 100 kilometres west of Baghdad.

The US government said it is prepared to open direct talks with Iran on how they can help counter the insurgents, marking the latest sign of rapprochement between the two countries over the last year.

Washington started repositioning its forces in the region over the weekend, sent an aircraft carrier to the Gulf and reinforced security at its Baghdad embassy.

Al-Maliki’s Shia-dominated government has left many Sunnis in western and northern Iraq feeling marginalised from power; a situation that has been exploited by Isis and other Sunni insurgent groups.

The International Organisation for Migration (IOM) estimated that 500,000 people fled their homes in and around Mosul last week, with many seeking refuge in the autonomous Kurdistan region.