A Syrian refugee living in Germany has been found guilty of defrauding Isis after he asked the group for hundreds of thousands of euros to commit a terrorist attack he had no intention of carrying out.

A district court judge in the city of Saarbruecken sentenced the 39-year-old hairdresser, originally from Damascus and known only as Hasan A., to two years in prison on 14 August, according to Reuters.

The judgement confers legal protection to Isis – a group regarded as terrorists by the European Union.

Hasan A. was found guilty of trying to get Isis members to pay him 180,000 euros (£163,600, $212,400) to carry out terrorist attacks using explosives in Germany.

He never received the money. However, during the trial, the prosecution argued that he had intended to commit terrorist attacks

Both the prosecution and the defence have appealed the ruling : the former claiming that Hasan A. was not a fraudster but a would-be terrorist while the latter claiming that he is not even guilty of the fraud charge.

It is not known how long Hasan A. has been living in Germany, which has welcomed over a million asylum seekers in the last two years.

In 2016 alone, Germany offered sanctuary to almost 300,00 Syrians – nearly three times as many as the rest of Europe combined and 160 times more than the UK, according to Eurostat figures.

The policy has stirred up divisions within German society and has precipitated the rise of the Alternative for Germany Party, which campaigns on an anti-immigration platform.

Germany refugees
Migrants and refugees seeking asylum in Germany attend a gym session at the shelter (file photo) Alexander Koerner/Getty Images

The anti-refugee sentiment has been spurred in part by a spate of terror attacks committed by Middle Eastern men who had pledged allegiance to Isis.

But despite weathering a lot of criticism for opening her 'open door' approach to refugees, Chancellor Angela Merkel enjoys a big poll lead in the polls ahead of September's election.

Saarbruecken is a city in south-west Germany, home to around 190,000 people. In June, a 27-year-old Syrian refugee killed a Red Cross councillor. The incident was not terror-related.