A German politician who was stabbed in the neck while campaigning in the city of Cologne on Saturday has been elected mayor of the city.
Henriette Reker - an independent candidate supported by Chancellor Angela Merkel's CDU party - won 52.7% of the vote, officials said.
She is in a serious but stable condition in hospital.
The suspected attacker, a German national, was angry about Germany's immigration policy, officials said.
Germany is struggling to cope with a huge influx of asylum seekers and Ms Reker has been in charge of finding accommodation for migrants arriving in Cologne.
Prosecutors say the 44-year-old suspect, who has not been named, faces charges of attempted murder and causing grievous bodily harm.
A psychiatric examination indicated he can be held criminally responsible, prosecutors and police said on Sunday.
Officials said the man had no police record and apparently acted alone.
Ms Reker was attacked while running a party information stand in Cologne, Germany's fourth-largest city. Four other people were injured.
She underwent an operation on Saturday and doctors say it went well. Ms Reker is expected to make a complete recovery, they added.
German Chancellor Angela Merkel expressed her shock at the attack and Interior Minister Thomas de Maiziere called it "appalling and cowardly".
Germany has said it expects 800,000 asylum seekers this year, but a leaked report suggested the number could be as high as 1.5 million.