A man has been jailed for fighting with jihadis in Syria after being filmed in a documentary.

Mohammed Yamin, now 25, initially denied joining al-Qaeda but investigators matched voice recordings made by police to previous recordings of a masked British militant caught on camera in 2013.

Wearing a khaki balaclava, he appeared in a Vice documentary alongside fighters in Isis and Jabhat al-Nusra, which were both al-Qaeda factions at the time.

Yamin was shown posing with an assault rifle in front of the black flag adopted by Isis, and threatening terror attacks in the UK.

He urged British people to “remove your government” and made reference to the murder of Lee Rigby, adding: “You will take the blame for the crimes committed worldwide by Britain itself. So we have to fight, it’s part of our obligation to protect our honour, protect our women.”

Mohammed Yamin, 25, was jailed for 10-and-a-half years for fighting with al-Qaeda in Syria (Vice/YouTube)

A court heard that Yamin went to Syria in July 2013 as a 20-year-old student and fought for a year before returning to the UK.

Security services knew him as an associate of Jafar Turay, a Muslim convert and former London rapper who travelled to the warzone after fleeing Britain while being investigated over a stabbing.

Yamin, who had previously been studying civil engineering, was arrested after landing at Heathrow Airport in 2014.

The Metropolitan Police said officers initially believed he provided clothing and equipment to terrorist fighters in Syria but “Yamin denied this, and in the absence of any evidence to the contrary, he was released with no further action”.

The court heard he had become “disillusioned” with al-Qaeda and returned to City University London to complete his degree.

In 2015, the Vice news documentary was brought to the attention of police but they were not able to identify the two masked British fighters who spoke.

Then in 2017, officers were alerted to a man acting suspiciously by the Women at War memorial in Whitehall.

He was spoken to by police who recorded the interaction on body-worn cameras, but not arrested, and the incident was flagged to counter-terror officers for further inquiries.

“As a result of the further enquiries, the officers identified that Yamin may have been one of the men in the Vice news video,” a spokesperson for the Metropolitan Police said.

“It was compared to body-worn video footage taken when police spoke to Yamin in Whitehall, and further enquiries with experts in facial and voice analysis confirmed that the man in the Vice news video was likely to be Yamin.”

Timeline of the Isis caliphate Show all 19 1 /19 Timeline of the Isis caliphate Timeline of the Isis caliphate ISIS began as a group by the merging of extremist organisations ISI and al-Nusra in 2013. Following clashes, Syrian rebels captured the ISIS headquarters in Aleppo in January 2014 (pictured) AFP/Getty Timeline of the Isis caliphate Abu Bakr Al-Baghdadi declared the creation of a caliphate in Mosul on 27 June 2014 Timeline of the Isis caliphate Isis conquered the Kurdish towns of Sinjar and Zumar in August 2014, forcing thousands of civilians to flee their homes. Pictured are a group of Yazidi Kurds who have fled Rex Timeline of the Isis caliphate On September 2 2014 Isis released a video depicting the beheading of US journalist Steven Sotloff. On September 13 they released another video showing the execution of British aid worker David Haines Timeline of the Isis caliphate The US launched its first airstrikes against Isis in Syria on 23 September 2014. Here Lt Gen William C Mayville Jnr speaks about the bombing campaign in the wake of the first strikes Getty Timeline of the Isis caliphate Isis militants sit atop a hill planted with their flag in the Syrian town of Kobani on 6 October 2014. They had been advancing on Kobani since mid-September and by now was in control of the city’s entrance and exit points AFP/Getty Timeline of the Isis caliphate Residents of the border village of Alizar keep guard day and night as they wait in fear of mortar fire from Isis who have occupied the nearby city of Kobani Getty Timeline of the Isis caliphate Smoke rises following a US airstrike on Kobani, 28 October 2014 AFP/Getty Timeline of the Isis caliphate YPG fighters raise a flag as they reclaim Kobani on 26 January 2015 VOA Timeline of the Isis caliphate Isis seized the ancient Syrian city of Palmyra on 20 May 2015. This image show the city from above days after its capture by Isis Getty Timeline of the Isis caliphate Kurdish forces are stationed on a hill above the town of Sinjar as smoke rises following US airstrikes on 12 November 2015 AFP/Getty Timeline of the Isis caliphate Kurdish forces enter Sinjar after seizing it from Isis control on 13 November 2015 AFP/Getty Timeline of the Isis caliphate Iraqi government forces make the victory sign as they retake the city of Fallujah from ISIS on 26 June 2016 Getty Timeline of the Isis caliphate Iraqi forces battle with Isis for the city of Mosul on 30 June 2017 AFP/Getty Timeline of the Isis caliphate Members of the Iraqi federal police raise flags in Mosul on 8 July 2017. On the following day, Iraqi prime minister Haider Al Abadi declares victory over Isis in Mosul Getty Timeline of the Isis caliphate Members of Syrian Democratic Forces celebrate in Al-Naim square after taking back the city of Raqqa from Isis. US-backed Syrian forces declare victory over Isis in Raqqa on 20 October 2017 after a four-month long campaign Getty Timeline of the Isis caliphate Female fighters of the Syrian Democratic Forces celebrate in Al-Naim Square after taking back the city of Raqqa from Isis. US-backed Syrian forces declare victory over Isis in Raqqa on 20 October 2017 after a four-month long campaign AFP/Getty Timeline of the Isis caliphate Trucks full of women and children arrive from the last Isis-held areas in Deir ez-Zor, Syria in January 2019 They were among the last civilians to be living in the ISIS caliphate, by this time reduced to just two small villages in Syria’s Deir ez-Zor Richard Hall/The Independent Timeline of the Isis caliphate Zikia Ibrahim, 28, with her two-year-old son and 8-month-old daughter, after fleeing the Isis caliphate, on Saturday 26 January 2019 Richard Hall/The Independent

He was arrested in January and charged with terror offences for joining al-Qaeda in Syria between July 2013 and June 2014.

Yamin, of Southwold Road in Hackney, admitted preparation of terrorist acts and membership of a proscribed group at London’s Old Bailey in July.

He denied possessing a gun for terrorist purposes and the charge was left to lie on file.

On Friday, he was sentenced to 10-and-a-half years in prison.

Judge Mark Dennis QC said: “The video recording demonstrates that as of that date the defendant, then aged 20, had deeply entrenched terrorist views.”

Hussein Zahir QC, for the defence, told the court Yamin's viability as a “combatant” was limited by the fact he was deaf in one ear, blind in one eye and asthmatic.

He said he had “completely rejected” his previous mindsetand was “deeply remorseful for what he has done”.

“This is a defendant who appreciates that he will be confronting a significant period of custody but this is also a defendant with the opportunity to pick up the pieces of his life.”

In a letter to the court, Yamin claimed he turned away from al-Qaeda as jihadi groups turned against each other and “things got uglier and uglier”.

Judge Dennis QC accepted Yamin had changed his lifestyle and described him as intelligent and articulate, but misguided.

He told the defendant: “However much you may now regret your actions it was at the end of the day your own decision freely made that led you to offend in the way you did.”

Only one in 10 jihadis returning from Syria have been prosecuted, it was revealed earlier this year.

Ben Wallace, the former security minister, said around 40 people had been successfully prosecuted by the end of February, “either because of direct action they have carried out in Syria or, subsequent to coming back, linked to that foreign fighting”.

But more than 400 people “of national security concern” are believed to have returned from conflicts in Syria and Iraq.

The British government has been increasing its use of controversial citizenship deprivation powers in an attempt to prevent living jihadis travelling back to the UK.

Several British Isis members have been captured by Kurdish groups in Syria, but security concerns are mounting amid a Turkish assault on the region where they are being held.