Pecoraro, who was suspended from the job after getting caught clocking in absent colleagues, took revenge after his suspension was renewed at the end of June as part of an ongoing investigation into the scam, local newspaper Il Giorno reported.
Mayor Laura Prati was shot in the stomach at least twice, while her deputy Costantino Iametti Roberto suffered a head injury.
Pecoraro was reportedly heard by witnesses as saying he had “settled the score” after the attack.
A town hall employee described him as being “armed to the teeth”, with at least one pistol and a rifle.
The assailant made his escape from the town hall, shooting in the air as he passed the square outside and took refuge in a trade union building, Corriere della Sera reported. There he ordered everyone out of the building, the newspaper said, and set off a molotov cocktail.
When the police tracked Pecoraro down he began firing again, but was soon arrested.