In all, 15 Shiite soldiers guarding an oil pipeline outside Mosul were killed in the attack, the New York Times said.
A provincial police spokesman said gunmen attacked the army encampment at Ain al-Jahash, about 12 miles from the provincial capital of Mosul, China's state-run Xinhua News Agency said.
The militants, thought to be members of the Islamic State of Iraq and Syria, a Sunni militant group with ties to al-Qaida, arrived in about 10 vehicles, police told CNN. They shot some soldiers and beheaded others. One man was tortured and hanged.
When reinforcement troops arrived several hours later, they found the soldiers' bodies, Xinhua said.
The Times said the attack shows ISIS members are expanding their reach in the country. Sunni Muslim forces have for months been in control of portions of Anbar province, including the city of Fallujah and parts of Ramadi. Now, with government forces cracking down there, it's driving ISIS members to flee to outlying areas, stretching army resources to chase them and defend the kind of far-flung installations targeted Tuesday.
The conflict in Anbar is also taking a human toll, rights workers said. The United Nations High Commissioner on Human Rights said some 300,000 people have fled the fighting in Fallujah and Ramadi, mostly to more remote portions of Anbar and neighboring provinces. The U.N. estimated Iraq would need some $34 million in foreign aid to help deal with the problem.