Iraqi officials say gunmen in two speeding cars opened fire on civilians near a town north of Baghdad, killing at least eight people and wounding 13.

Eyewitnesses told the police they saw the gunmen displaying the black flag of the Islamic State group.

Two police officials said Wednesday that the attack happened late the night before in a busy commercial area near Tarmiyah. The town is located about 50 kilometers, or 30 miles, north of Baghdad.

Iraq is heading into parliamentary elections on May 12 — the first balloting since the government declared IS defeated in Iraq. Despite the defeat, IS militants are still capable of launching deadly assaults.

The police officials and eyewitnesses spoke on condition of anonymity as they were not authorized to talk to the media.