(CNN) -- Gunmen pretending to be an official security force opened fire on police at numerous checkpoints in Haditha, Iraq, early Monday, killing 27, authorities said.
Three of the attackers were killed in shootouts with officers, according to Khalid Salman, head of the Haditha local council
In addition to the 27 killed, three officers were wounded, Salman said.
At least 14 black SUVs with more than 30 gunmen disguised in SWAT-style uniforms entered the town at about 2 a.m., Salman said. The gunmen were carrying forged arrest warrants for senior police officers.
"Iraqi security forces believe that those attackers drove all the way down from desert areas close to Bayji, about 200 km (124 miles) north of Haditha," Salman said.
When they arrived at the first police checkpoint on the northern outskirts of town, they ordered all local police officers to turn off their cell phones, Salman said.
"The attackers told local police at that checkpoint that they have arrest warrants issued from Baghdad against two senior police officers in Haditha," he said. "All seven local police at that checkpoint were convinced after the attackers showed them forged arrest warrants, and they agreed to switch off their phones -- and later, all were killed in cold blood."
The gunmen then headed to the Haditha police station, where they convinced officers they were an official force sent by the federal government to carry out the arrests, Salman said.
Later, the attackers went to the home of the commander of Haditha's SWAT force, Captain Khalid Daham, and killed him, Salman said.
The former commander of emergency police in Haditha, Mohammed Hassan, was also killed inside his house along with two of his bodyguards.
At one point, Haditha police officials began to suspect the gunmen. When they asked them to stop until they involve more security officials in their mission, the gunmen began clashes with security forces that lasted an hour, Salman said.
Three of the attackers were killed during the clashes, but only one body was left behind, and the attackers managed to flee the town, Salman added.
During the clashes, the attackers raised the black flags of Islamic State of Iraq -- an umbrella group which includes al Qaeda in Iraq. The attackers also left some leaflets behind warning Iraqi security that they will carry out more attacks, Salman said.
"This was a serious security breach in the town," Salman said. But he said he also blames the central government because in the past, Iraqi security forces have been sent to carry out arrests without notifying the local security forces.
"Those gunmen took advantage of this miscommunication between the central government and the local authorities in Haditha," Salman said.
"We hold the Iraqi army full responsible for this incident because they are responsible for securing the highways that link towns and cities with each other," the Anbar Provincial Council said in a statement read by Sadoun al-Jumaily, deputy president.
The province will hold a three-day mourning period, the council said.
Haditha, in Anbar province, is predominantly Sunni town about 360 km (224 miles) west of Baghdad. Anbar was once dominated by Sunni insurgents but is now under control of Iraqi security forces.
The province is a vast territory in which Iraq shares borders with Syria, Jordan, and Saudi Arabia. Much of the region is desert, and most of the residents live in the towns and cities.
The Islamic State of Iraq has been behind numerous recent attacks.
On February 23, a series of explosions and shootings killed at least 44 people and wounded more than 200 in Baghdad and elsewhere. The Islamic State of Iraq claimed responsibility.
CNN's Josh Levs contributed to this report.