A Briton who died fighting alongside Kurdish forces in Syria killed himself to avoid falling hostage to Islamic State (IS) militants, an inquest heard.

Ryan Lock, 20, from Chichester, died in December with the People's Defence Units (YPG) in Raqqa.

When surrounded by IS fighters he turned his gun on himself to avoid capture and a "frightening and painful death", the hearing was told.

A former chef without military skills, he told family he was on holiday.

After revealing he was not backpacking in Turkey as they had thought, Mr Lock kept in touch with his family via Facebook Messenger, the inquest in Portsmouth heard.

He sent them pictures and updates on the military training he was receiving.

But after losing contact with him last December, Mr Lock's father Jon Plater found images online of his son with an IS fighter standing over his body in the northern city of Raqqa - considered to be the terrorist group's de facto capital.

Mr Lock's death was later confirmed.

Previously, supporters of the YPJ female-fighting force paid tribute to Mr Lock, saying his memory would "forever live on in our struggle for the freedom of Syria and our hope for change in the whole world".

YPG general command member Mihyedin Xirki also said Mr Lock was a "martyr" who died "putting up a brave fight".

The volunteer, who attended school in Havant, Hampshire, became the third known British man to die fighting alongside the Kurds against IS.

A fourth man, 22-year-old Luke Rutter, from Birkenhead, died in Raqqa on 5 July.

God bless this brave British man who gave his life so others could have their freedom. I respect and understand his decision not to be tortured and killed in a inhumane manner, leaving this world on his terms.

This is somewhat old news but the recent court proceedings have finally released all the details which is why I thought it should be posted here.

Damn. It must take some damn big balls to turn a gun on ones self to avoid being captured. I wonder what was going through his mind while he did this, what his last thoughts were and how he managed to overcome the fear of death and doing this action.