Two young British men have admitted spending eight months in Syria fighting alongside an al Qaida-linked terrorist group.
Childhood friends Mohammed Nahin Ahmed and Yusuf Zubair Sarwar, both 22, from the Handsworth area of Birmingham, fled to the war-torn country last May after contacting Islamic extremists.
They returned in January only after their families put pressure on them to come home.
Officers from West Midlands Police's counter-terrorism unit were waiting for them at Heathrow Airport, where they were arrested.
A trial due to start today at London's Woolwich Crown Court was abandoned when they each admitted one count of engaging in conduct in preparation of terrorism acts contrary to Section 5 of the Terrorism Act.
Sarwar's family reported him missing to police in May last year after they found a hand-written letter from him revealing he had fled to Syria.
The letter addressed to his mother Majida Sarwar detailed his intention to "do jihad" by joining a terrorist group called Kataib al Muhajireen (KaM) - later renamed Kateeba al-Kawthar.
The letter also contained money to pay off his debts and instructions to end his mobile phone contract.
In the weeks before leaving the UK he faked documents to convince his family he was travelling to Turkey as part of a two-week trip organised by Birmingham City University, where he was a part-time computer science student.
Prosecutor Brian Altman told the court: "Without the mother's actions the police would not have been in a position to be waiting for the men on their return."
Ahmed had told his family he was going on holiday with Sarwar.
In fact the men had completed a carefully planned a one-way trip to the Syrian battleground via Turkey, after researching and discussing jihad, martyrdom and the enemies of Islam, Mr Altman QC told the court.
In one text exchange Ahmed urged Sarwar not to kill any innocent people or commit suicide, the court heard.
A police search of the men's homes while the pair were in Syria, revealed an online conversation between Ahmed and a Swedish national fighting with the KaM, during which Ahmed said he wanted to join the terrorist group.
Ahmed was told by another Danish Islamist extremist that jihadis could return to their home countries in he EU to carry out tasks.
Ahmed, who was born in Bangladesh, moved to Britain as a child, while Sarwar, who is of Pakistani descent, was born in Britain.
After their arrest the pair told police that they travelled to Syria for humanitarian reasons.
But officers found "thousands" of warzone-related images of the men with guns on a digital camera carried by the pair into the UK.
Specialists said the images showed they had been in and around Aleppo, the scene of ongoing fighting between Syrian government troops and rebels.
Traces of "military-grade explosives", including TNT and nitro-glycerine were also found on the men's clothes and trainers.
The initial search of their homes revealed images of Islamic propaganda on both of their computers, including images of Islamic State of Iraq and the Levant (Isis) flags, shaheed (martyr) literature and several texts which are linked to the jihadi mindset.
Officers also found social media and email conversations between the pair and Islamic extremists.
Over Skype, Ahmed talked to a Swedish national who was fighting with KaM.
He told the fighter: "I come to join KaM," to which the Swede replies: "Inshallah (God willing)".
Ahmed later asked a Danish Islamic extremist: "Would the brothers in Yemen accept me?"
Online conversations between Sarwar and Ahmed also revealed Ahmed's plan to travel abroad to join the jihad.
He tells Sarwar: "I cannot tell anyone I'm going to jihad. Lol. I'll get arrested."
Judge Topolski QC said he would not pass sentence until a Court of Appeal decision about a similar case had been heard later this summer.
However, sentencing opened this afternoon.
The judge earlier told the court that he was willing to offer a reduction in sentence if the defendants were to plead guilty.
He described the case as a "grave one".
He told the court that together they "carefully planned a journey from the UK to Turkey and on to Syria to join Islamist rebels fighting the regime of Bashar al-Assad".
Assistant Chief Constable Marcus Beale, senior officer for counter terrorism in the West Midlands, said: "These young men went to considerable lengths to hide their plans from their families, who have since suffered a great deal of distress.
"It's not easy to know everything that a family member is doing all of the time, but we encourage parents to hold a healthy interest and curiosity into who their children mix with and who seems to hold a strong influence over them.
"Crucially, if families are worried that a member is thinking of travelling to Syria it is very important that they tell the authorities as soon as possible.
"The police and other agencies can offer support to help safeguard those who are vulnerable to radicalisers and the sooner we can intervene the better chance we have of preventing young people from becoming embroiled in criminal behaviour.
"Police can't do this alone. We need a whole community effort."
The prosecutor also told the court how the men ordered books from Amazon as part of their preparation to fight in Syria, including Islam For Dummies, the Koran For Dummies and Arabic For Dummies.