A 20-year-old British man who traveled to Syria to fight against Islamic State has been killed in battle, his family have said.

Ryan Lock, a former chef who had no previous military training, told his family he was vacationing in Turkey before crossing the Syrian border and joining the Kurdish People’s Defence Units (YPG). He died on 21 December during an assault on Raqqa, Islamic State’s de facto capital.

The YPG wrote a letter to Mr Lock’s family informing them of his death and praising him for his bravery.

The Guardian reports that it said:

Ryan joined actively in our offensive against the terror threat that Isis caused upon Rojava, Kurdistan. Here, in the dark hours of December 21, 2016, we lost our brave companion Ryan and four other fighters in Jaeber village. Ryan was not only a fighter providing additional force to our struggle. In fact, with his experience and knowledge he has been an example for younger fighters. While he has reached a vast amount of achievement up in our front lines, Ryan has served the purpose of a very important bridge between us, the Kurds of Rojava. He crossed continents for the destiny of our people and humanity.

Mr Lock is the third Brit to die fighting Islamic State. Dean Evans, a 22-year-old farmer, died in July 2016 in northern Syria, and Konstandinos Erik Scurfield, a former Royal Marine, was killed in March 2015.

Ryan Lock was just weeks away from returning home when he was killed. He wrote on Facebook on 31 August: “I’m on my way to Rojava. I lied about going to Turkey. I’m sorry I didn’t tell anyone. I love all of you and I will be back in six months.”

He narrowly escaped death on 24 November when most of his unit was killed in an airstrike, allegedly by the Turkish air force. Twelve fighters were killed, including American Michael Israel and German Anton Leschek.

In a statement, his father said: “Ryan was a very caring and loving boy who would do anything to help anyone.

“He had a heart of gold. We ask for privacy to allow our family to grieve.”