A leading politician from Germany’s far-rightwing populist party Alternative für Deutschland has been seriously injured by masked assailants, who beat him unconscious in what police have described as a politically motivated attack.

Frank Magnitz, 66, leader of the AfD in Bremen, was almost beaten to death, according to the party’s federal chairman, Jörg Meuthen, who tweeted a graphic photograph of the unconscious MP with what appeared to be a deep gash to the head and a bruised face.

Alexander Gauland, an AfD co-leader, condemned the attack, which took place on Monday evening, as a “cowardly bloody deed”. Alice Weidel, the party’s leader in the German parliament, blamed the media and politicians from the traditional parties for stoking hatred towards the AfD “on a daily basis”.

Police are looking for three people suspected of having carried out the attack and have appealed for witnesses. They said they had little doubt the attack was politically motivated. Since mid-December, police have recorded eight attacks on AfD offices.

Magnitz said he recalled very little about the attack, having been knocked unconscious. He did not see his attackers or hear if they had said anything to him, he told the news agency DPA from his hospital bed.

The incident has been condemned by MPs across the political spectrum, who expressed their outrage on social media.

Steffen Seibert, the government spokesman, called it a “brutal attack”, which should be “strongly condemned”.

“It’s to be hoped that the police are quickly able to catch the perpetrators,” he tweeted.

The German foreign minister, Heiko Maas, of the Social Democrats, tweeted: “Violence should never be a means for political disputes – totally regardless against whom or what the motives for it are. Whoever carries out such a crime has to be punished accordingly.”

Cem Özdemir, of the Green party, tweeted that he hoped the perpetrators would soon be caught and tried. “Even towards the AfD there is no justification for violence,” he wrote. “Whoever fights hatred with hatred ultimately allows hatred to win.”

The AfD released a picture of Frank Magnitz in hospital after the attack. Photograph: AfD

According to police, Magnitz, a father of six children, was on his way home from a new year’s reception at a regional newspaper when he was attacked. He was reportedly knocked to the ground and beaten unconscious with what is believed to have been a wooden object, before being kicked in the head.

A passerby intervened, causing the attackers to flee, according to the police. The Bremen office of the AfD praised the man for his “courageous intervention”, saying it was thanks to him that Magnitz was still alive.

It also said that two police officers had been stationed outside Magnitz’s hospital room for his protection and were ready to interview him.

Magnitz was elected to the Bundestag, the German parliament, in autumn 2017, after his party became the main opposition for the first time when it won just under 13% of the vote in the national election. He is one of the AfD’s 82 male MPs. The party has 91 seats in total.

Faced with accusations of racism, he responded last September by saying his wife was of Turkish origin and his researcher a German-Cuban, and that he was open-minded. “In my world, being cosmopolitan does not preclude a love of one’s homeland and patriotism,” he wrote.

Magnitz has said he was a former voter for Angela Merkel’s Christian Democratic Union who turned to the AfD after rejecting her views on immigration.

He has always been a vocal critic of the euro. The AfD was first founded in 2013 on opposition to the single currency before it revamped itself as an anti-immigration party that pledged to shake up Germany’s consensus system of government.