INGOLSTADT, Germany — Police ended a hostage standoff at a city hall on Monday by storming the building, shooting and wounding the captor, and freeing his two captives unharmed.
The crisis in the Bavarian city of Ingolstadt prompted Chancellor Angela Merkel to cancel an election rally she had planned there.
Officials said the 24-year-old kidnapper had previously been banned from entering city hall because he was stalking one of its female employees. The 25-year-old woman was one of the people he was holding hostage.
The kidnapper, whose identity was not released, was shot in the legs and a shoulder and taken to a hospital, police spokesman Guenther Beck said.
Two other people the captor had taken hostage, including a deputy mayor of Ingolstadt, were freed from the building earlier in the day, police said.
The kidnapper ‘‘was carrying a plastic gun which looked like a real weapon and a big knife’’ — which is why police officers were forced to use their weapons, Ingolstadt police said in a statement Monday night.
Psychologists were counseling the four released hostages.
Police said the attacker was homeless and had been in psychiatric treatment until last month. In cases unrelated to the stalking, the man had previously been convicted of personal injury and harassment.