Detectives arrested him for failing to cooperate and he was later remanded into custody after pleaded guilty to obstructing or frustrating a schedule seven search under the Terrorism 2000 Act.Karina Claire, defending, said Clarke admitted he had acted like a “teenage brat”.She said he had wanted to protect “women and children” and that his cause was “humanitarian”, but as well as packing medical supplies, he had also carried “military paraphernalia” and items “to defend himself in armed combat”.She said: “In the run up to this case he had been open with police. Robert Clarke spent four years in the ArmyCredit:Wales News Service Westminster Magistrate’s Court heard Clarke received death threats from purported Islamist extremists after details of his arrest first emerged. Prison staff were so worried about the threat from Islamist terrorist inmates that he was transferred to solitary confinement while on remand.Louise Gray, prosecuting, told the court Clarke came to police attention from July 2016 when his social media accounts suggested he wanted to join Kurdish forces against Islamic State in Iraq and Levant (Isil).Police repeatedly warned him of the dangers, but he told them he was booked on a flight to Jordan on September 8 of last year. He was held by detectives at Heathrow under counter-terrorism stop and search powers and officers asked for his iPhone and then his pin number.Clarke, who is unemployed from Pembrey, Carmarthenshire, refused to give it to them, claiming he had forgotten it.Clarke then told officers: “I ain’t telling you s***, charge me with perverting the court of justice, f*** your interview and f*** you.” Want the best of The Telegraph direct to your email and WhatsApp? Sign up to our free twice-daily Front Page newsletter and new audio briefings. There are a number of people there on remand for cases of terrorism or supporting that offence of terrorism who would not take kindly to the presence of someone like Mr ClarkeKarina Claire, defending “He had made them cups of tea and he had told them in great detail what his plans were.”Having served in the military he felt he could assist victims of war in that country.She went on: “As a result of press coverage he was sent extremely nasty threats from Islamic extremists or people purporting to support Islamic extremism.”Prison staff had told her they had concerns about his safety because he had openly said he wanted to fight Isil. She said: “There are a number of people there on remand for cases of terrorism or supporting that offence of terrorism who would not take kindly to the presence of someone like Mr Clarke. “He had to spend time in solitary confinement.”District Jude John Zani told Clarke: “I am afraid Mr Clarke we live in difficult and potentially dangerous times, when frustration has to be relaxed when you’re asked to supply important information by police officers, who are merely doing their job trying got keep everyone, including yourself safe.”Nobody knows what was on your phone because you never handed over your pin.”Had you not served the time you have you would almost certainly be going to prison.”Taking into account his early guilty plea and the time spent in custody he handed Clarke a 12 months community order, 50 hours of unpaid work and £85 in victim surcharge.He was also given a 12 month ban on travelling abroad. A former British soldier arrested while travelling to fight against Islamic State in Syria received death threats from extremists and had to be held in solitary confinement for his own safety, a court has heard.Robert Clarke was held after refusing to hand over the pin code to his phone when police stopped him at Heathrow on his way to join Kurdish fighters.The 23-year-old from South Wales was handed a 12 month community order after admitting obstructing police under counter terrorism laws.