A British man accused of trying to take a police officer's gun in order to kill US presidential hopeful Donald Trump in Las Vegas has been denied bail by a federal judge.
Federal Magistrate Judge George Foley declined to grant bail to 20-year-old Michael Steven Sandford, who has been charged with an act of violence on restricted grounds.
Judge Foley said Sandford was a risk to the community as well as a flight risk.
Sandford has not yet entered a plea.
Court research shows he is unemployed, living out of his car and is in the US illegally. A federal public defender said he has autism and has attempted suicide.
Sandford was arrested on Saturday at the Treasure Island Casino, where Mr Trump was speaking.
He is accused of making a grab for a Las Vegas police officer's holstered gun, and investigators say he wanted to kill Mr Trump.
Sandford wore shackles and appeared to tremble during the district court hearing in Nevada.
Public defender Heather Fraley said Sandford appeared to be competent and had not been diagnosed with a mental illness, but has autism and had previously attempted suicide.
He was living out of his car, did not have a job and was in the country illegally after overstaying a visa.
His mother told court researchers that he was treated for obsessive compulsive disorder and anorexia when he was younger, and that he once escaped a hospital in England.
Ms Fraley argued that Sandford should go to a halfway house because he did not have a criminal history, but the judge said he should stay in detention ahead of a July 5 court date.
Sandford told officers he had been planning an assassination for about a year and was convinced he would die in the attempt. He said he also reserved a ticket for a Trump rally in Phoenix, scheduled for later in the day, as a back-up plan.
He told authorities that he went to the Battlefield Vegas shooting range the day before the rally and fired 20 rounds from a 9mm Glock pistol to learn how to use it.
Police detectives who visited the range spoke with an employee who confirmed that he provided Sandford with shooting lessons, according to the complaint signed by Secret Service Special Agent Joseph Hall.
About 1,500 people attended the Las Vegas rally, which was held in the Mystere Theater inside the casino. Attendees had to pass through metal detectors manned by Secret Service, police and casino security officials.