Two men who travelled to Syria to join rebel fighters have admitted preparing to carry out terrorist acts.

Childhood friends Mohammed Nahin Ahmed and Yusuf Zubair Sarwar, both 22, from the Handsworth area of Birmingham, spent eight months in the war-torn country last year after contacting Islamic extremists from the UK.

The men were arrested at Heathrow Airport by West Midlands Police's counter-terrorism unit on their return home in January.

At London's Woolwich Crown Court today, they each admitted one count of engaging in conduct in preparation of terrorism acts contrary to Section 5 of the Terrorism Act.

The families of both men had put pressure on them to return to the UK once they discovered where they were.

Sarwar's family reported him missing to police in May last year after they found a hand-written letter from him in which said he had left to join a terrorist group called Kataib al Muhajireen (KaM)- later renamed Kateeba al-Kawthar - "to do jihad".

Days earlier he had told 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.

It prompted a search of the men's homes, which 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.

West Midlands Police said the men showed the mind-set to go and join the jihad in Syria, before carrying out research, buying equipment, and finally travelling a well-trod route to get inside the battle zone via Turkey.

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 is due to open 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".