A court in Germany on Tuesday convicted six Syrian and Libyan refugees in connection with an attack last Christmas on a homeless man who had been sleeping in a Berlin train station.

Surveillance video of the incident shows the victim, a 37-year old Polish man, sleeping on a bench under a layer of paper sheets he had been using to keep warm. The main defendant can be seen setting the paper on fire before the refugees run away, laughing.

A train conductor and passers-by quickly put out the fire. The homeless man was not seriously hurt.

None of the attackers, who ranged in age from 16 to 21, attempted to help the man.

The main defendant, identified only as Nour N., 21, because of German privacy laws, was sentenced to two years and nine months in prison for attempted grievous bodily harm.

According to local media reports, Nour argued in court that he wanted only to "startle" the homeless man, not injure him.

Three of the accused received suspended eight-month jail sentences for their roles in the assault. The other two assailants were convicted of failure to render assistance to the homeless man and were sentenced to time served.

The defendants entered Germany as asylum-seekers in 2014 and 2016, according to authorities.