Image copyright Julia Quenzler Image caption Naa'imur Zakariyah Rahman is on trial at the Old Bailey

A man accused of plotting to kill Theresa May has told the Old Bailey his alleged plans, including an attack from the edge of space, were a fantasy.

Naa'imur Zakariyah Rahman, a 20-year-old originally from Walsall, denies preparing acts of terrorism last year.

Speaking at the start of his defence, Mr Rahman said he faked support for attacks when he spoke online to a man.

That man - who Mr Rahman thought was a commander from the Islamic State (IS) group - was an undercover officer.

Earlier in the trial, the jury saw a secretly recorded video of Mr Rahman meeting an undercover officer, who was posing as an IS organiser, and asking for a bomb and suicide vest so that he could fight his way into Downing Street to kill the prime minister.

On Monday, Mr Rahman told the jury his life had been turned upside down when he was arrested for sending a sexually explicit text message.

He said that, after being thrown out of home, he was desperate to leave the UK.

'I was desperate'

Mr Rahman was also grieving for an uncle who had died fighting alongside IS in Syria.

He told the court: "My uncle had said that if you join a sleeper cell, Islamic State will pay for your accommodation.

"I was desperate. When you're homeless, you're just thinking about a place to stay."

The jury heard that during the first online exchanges with the purported commander, Mr Rahman allegedly hoped to car-bomb Parliament, even though he could not drive.

He then said: "I learned in science, when I was younger, of a kafir [disbeliever] who went into space in a high altitude hot air balloon.

"If you sent hot air balloons above the altitude planes could reach, and have brothers with missiles above, God willing you can drop them."

The undercover officer replied: "That is a good idea, we never thought about that before."

'Showing off'

Ali Bajwa QC, defending, asked his client if any of his ideas were serious.

"I was showing off," said Mr Rahman. "I was mentioning the most extravagant line possible that I could think of.

"It was a fantasy. Just ideas, nothing more. I felt like he was encouraging me.

"Why did you want to be put in a sleeper cell?" asked Mr Bhajwa.

"So I would have a place to sleep," replied Mr Rahman.

The trial continues.