Updated

A candidate who was stabbed as she campaigned by a man who said he acted out of anti-foreigner motives was elected Sunday as the new mayor of Cologne, Germany's fourth-largest city.

Henriette Reker won 52.7 percent of the vote, final results showed. Reker, who is currently responsible for housing refugees in Cologne, ran as an independent but was backed by Chancellor Angela Merkel's conservative Christian Democrats and two other parties.

Reker was stabbed in the neck and seriously wounded Saturday by a 44-year-old German man. A psychological examination showed that there is no reason to doubt he can be held criminally responsible, prosecutors and police said Sunday.

The suspect, who hasn't been identified, was ordered kept in custody on suspicion of attempted murder and dangerous bodily harm.

The man has told officials, without giving details, that he was actively involved in the far-right scene in the past, prosecutors and police said in a joint statement.

"This time goes back to the '90s," the statement said. "In what function and intensity" he was involved is now a matter for investigation.

Officials have said that the man apparently acted alone and had no police record.

Germany's interior minister has said that the attack on Reker underlines growing concerns over hatred and violence amid the refugee crisis.

Doctors say an operation Saturday went well and Reker's life wasn't in danger. They say she is expected to make a complete recovery.

Reker, 58, had been one of the pre-election favorites to win. She handily beat the other main candidate in a seven-strong field, center-left Social Democrat Jochen Ott, who polled 32 percent.