An intruder who tried to climb a wall into Buckingham Palace with a knife and cocaine in his rucksack last year has been spared prison.

Cameron Kalani, a wildlife photographer, was having a "psychotic episode" and tried to scale the wall in the early hours of May 10 last year in the hope that he would be arrested. The 44-year-old was caught with a 20cm kitchen knife and cocaine in his bag when he was arrested after climbing back into Buckingham Palace Road.

Prosecutor Alexander Alawode told the Westminster Magistrates Judge that CCTV footage showed Kalani "seemed very confused" after he was detained by palace police officers for trespassing into the Royal Mews. Meanwhile, friends described the intruder as a talented wildlife photographer with a keen interest in mathematics and physics, and noted that he had never expressed any interest in the British royal family, reports Mail Online.

Kalani, who had previously pleaded guilty to trespassing on a protected site, possession of a bladed article, and possession of a wrap of cocaine, told in his plea that he had travelled to London from his home in Haywards Heath, West Sussex, while in a state of psychosis in a bid "to be arrested." He added that he packed the knife and the drug in his bag to enhance his chances of being arrested.

Kalani insisted that he scaled the palace fence after seeing a sign reading, "Do not climb," and did not know that the wall was connected to Buckingham Palace Gardens. He told the court, "I had not slept and was in a state of crisis. I didn't understand the sign was for Buckingham Palace Gardens."

Deputy District Judge Roy Brown has ruled that the photographer was mentally ill and had no intention of harming anyone. Kalani, who was diagnosed with "schizoaffective disorder," was handed a 24-week prison sentence suspended for 12 months, at the court on Tuesday.

Kalani is required to attend a 30-day rehabilitation programme as a part of his suspended sentence, and wouldn't be allowed to enter the SW1A postal area. He also has to pay £213 costs.

While announcing the order, the judge told Kalani that he was lucky not to have been killed by police. He said, "You are a very fortunate man indeed. It is just good luck and good fortune that neither you nor anyone else was either seriously injured or killed in the course of your escapade in May last year. The police were extremely restrained in the way they behaved with you in the face of an ongoing threat."

"Behave yourself and you won't have to go to prison," the judge told him.

Police and soldiers at Buckingham Palace
Police and soldiers at Buckingham Palace in this picture from 2017