A Syrian attacker who aligned himself with the Islamic State group has been jailed for life in Germany after fatally stabbing three people at a cultural event.

A Syrian man was sentenced to life in prison on Wednesday for killing three people in an Islamist-motivated knife attack at a summer festival in the German city of Solingen last year.

The court in Duesseldorf said Issa Al Hasan, 27, was a member of the Islamic State militant group and had acted out of "treacherous and base motives".

The knife attack in August 2024, in which another eight people were seriously wounded, took place on the opening night of a three-day "festival of diversity".

It was one of a series of attacks attributed to asylum seekers and migrants that pushed immigration to the top of the political agenda ahead of a general election in Germany early this year.

The presiding judge in Duesseldorf said Hasan had acted "on the basis of his radical Islamic beliefs".

RTL

The knife attack took place on the opening night of a three-day 'festival of diversity' / © AFP/File

The defendant "endorsed the goals of IS" and wanted to "respond to the call of IS leaders to carry out attacks in Western Europe" because he rejected the Western "liberal way of life", he said.

His goal was to "strengthen the impact of IS in Europe" and "take revenge for fallen IS fighters", the judge said.

When prosecutors charged him in February, they said Hasan had been in contact with representatives of the Islamic State group ahead of the attack that set out to harm "non-believers".

IS later said in a statement on the Telegram messaging app that "a soldier" of the group had carried out the attack in "revenge" on behalf of Muslims "in Palestine and everywhere".

- Full confession -

Hasan made a full confession during his trial, which was held under tight security in Duesseldorf.

In a statement read out by his lawyer, he voiced remorse for having "committed a grave crime" and said: "Three people died at my hands. I seriously injured others.

RTL

Officials said after the attack that two men and a woman were killed by being stabbed in the neck / © AFP/File

"Some of them survived only by luck. They could have died, too... I deserve and expect a life sentence."

The Solingen rampage was one of a string of attacks blamed on migrants that inflamed Germany's debate on migration.

The centre-right CDU/CSU, which demanded tough curbs on immigration in the wake of the attacks, came first in the election with 28.5 percent of the vote.

The biggest gains however were made by the far-right Alternative for Germany (AfD), which saw its share of the vote more than double to over 20 percent.

Officials said after the attack that two men aged 56 and 67 and a 56-year-old woman were killed by being stabbed in the neck.

RTL

Hasan made a full confession during his trial, which was held under tight security in Duesseldorf / © AFP/File

The attack put an abrupt end to the street festival which marked the city's 650th birthday.

Hasan, who had been slated for deportation, was arrested the following day at a hostel for asylum seekers not far from the scene.

He was later charged with three counts of murder, 10 counts of attempted murder and membership of a foreign terrorist organisation.