Cadano al Campo mayor Laura Prati was hit in the abdomen and the arm in the attack at the town hall while deputy mayor Costantino Iametti was injured in the head.
Both officials were rushed to a hospital after the ambush, in which witnesses said the traffic warden used a sub-machine gun, a sawn-off shotgun or a pump-action shotgun.
The VareseNews website named the traffic warden as 61-year-old Giuseppe Pegoraro, who was earlier suspended from duty for suspected fraud.
Witnesses said Pegoraro fled the scene of the ambush, shouting: "Now I have settled my scores".
He reportedly fired several shots at the window of one of the police cars pursuing him but the officers managed to surround and arrest him.
Police found several guns inside Pegoraro's vehicle. He had managed to enter the mayor's office as she was holding an open morning for local citizens.