The attack started at dawn with a suicide car bomber hitting the blast walls that surround the police station in the village of al-Salman outside the town of Tarmiyah, a police officer said. He said an assault by armed militants followed.
He said the attack killed five police officers and four civilians, while wounding 11 people.
Two medical officials confirmed the causality figures. All officials spoke on condition of anonymity as they were not authorized to release the information.
Tarmiyah is about 50 kilometers north of Baghdad. No group immediately claimed responsibility for the attack. Iraqi forces, backed by US-led airstrikes, are fighting the extremist Islamic State group, which now controls about a third of the country.
The event, which draws hundreds of thousands of Shiite pilgrims, marks the passing of 40 days after the anniversary of the seventh century martyrdom of the revered Shiite saint Imam Hussein, the grandson of the Prophet Muhammad.