SUNNI militants have summarily executed at least 14 Shi'ites after setting up a roadblock north of Baghdad, stopping trucks and checking the IDs of drivers.

The attack was reminiscent of the darkest days of the Sunni-Shi'ite sectarian bloodshed in Iraq in 2006-2007, when thousands of people were killed because of their religious affiliation or forced to abandon their homes under threat of death.

Lingering tensions between Sunnis and Shi'ites have been inflamed by persistent violence in Iraq and the civil war in neighbouring Syria, and there are growing fears that the country is slipping back towards all-out sectarian conflict.

Two local officials said some 150 militants carried out a co-ordinated operation during the night that included the highway killings, in the area of Sulaiman Bek, a town north of Baghdad.

The militants began by attacking the town itself with mortar rounds, rocket-propelled grenades and automatic weapons late on Wednesday.

That attack drew security forces away from the highway connecting Baghdad with the north, after which a group of around 40 militants broke off and set up the checkpoint.

They only maintained it for about half an hour but were able to stop dozens of truck drivers, and executed at least 14 who were Shi'ites.

"These criminals belong to what is called the Islamic State of Iraq, and they targeted Shi'ite drivers and left the Sunnis," local official Shalal Abdul Baban told AFP, referring to an al-Qaeda front group.

"It was killing by ID," he said.

Iraqi identification cards list a person's name and place of birth, from which religious affiliation can be surmised.

The entire operation, including the attack on the town in which at least one person was wounded, lasted for about three hours, after which the militants withdrew.