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.

Trending: Charlottesville suspect on school trip to Nazi camp Dachau: 'This is where the magic happened'

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.

Don't miss: Second child rapist executed with AK-47 and hanged from crane in Yemen

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.

Most popular: Road safety campaign accused of 'sexualising' Muslim girls with hijab mistake

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.

View photos Germany refugees More

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.

You may be interested in: