A young British Muslim repeatedly tried to join Islamic State in Syria in a bid to achieve his ambition of becoming a martyr, his trial has heard.
Zakariya Ashiq, 20, from Coventry, left the UK in November, but was forced to return after failing to cross the border from Jordan into Syria, the Old Bailey was told.
He was arrested at Heathrow airport on his way home on 20 November.
Mr Ashiq denies preparing acts of terrorism.
He has also pleaded not guilty to assisting other people to take part in terrorist acts.
The prosecution said exchanges found on his mobile phone revealed he appealed to two friends for help in crossing the border.