More than 2,000 demonstrators had gathered in the centre of Kut, capital of Wasit province south of Baghdad, to demand provincial governor Latif Hamad al-Tarfa's resignation over poor basic services.
A senior police officer pledged that the guards, privately employed by Wasit council, would face punishment.
The protest started at around 9:00 am (0600 GMT), and as the demonstrators approached the building, the guards moved up to the roof while police and soldiers stayed at ground level.
A group of demonstrators tried to storm the building, prompting Iraqi security forces to fire warning shots into the air, followed by the guards firing into the crowd from the roof, an AFP journalist at the scene said.
Dr Mohammed al-Mayahi from Kut hospital's emergency room said 12 people were wounded in the shooting. "Those were private guards, only they fired at the protesters. They were outside the law," police Brigadier General Hussein Jassim told AFP. "Our forces only fired into the air."
Major Mohammed Saleh, the top police intelligence officer in Kut, said: "Measures will be taken against the private guards but after the situation has calmed down."
Short link: