LAS VEGAS - A British man who used to live in Hoboken is accused of trying to take a police officer's gun and kill Donald Trump in Las Vegas, according to the Secret Service.

A complaint filed Monday in U.S. District Court in Nevada charges Michael Steven Sandford with an act of violence on restricted grounds. 

Federal Magistrate Judge George Foley declined to grant bail to the 20-year-old, stating that Sandford was a risk to the community and a flight risk.

Sandford has not entered a plea.

Court research shows he is unemployed, living out of his car and in the U.S. illegally. A federal public defender says he has autism and has attempted suicide.

Authorities said Sandford went to a Trump rally on Saturday at the Treasure Island Casino and approached a Las Vegas police officer to say he wanted an autograph from Trump. The report says Sandford was arrested after grabbing the handle of an officer's gun in an attempt to remove it.

Sanford had a United Kingdom driver's license with him at the time, according to the complaint signed by Secret Service Special Agent Joseph Hall.

Agents said Sandford told them he had been in the U.S. for about a year and a half, lived in Hoboken, and drove to the San Bernardino, California, area before coming to Las Vegas on June 16.

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 backup.

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 shooting lessons, according to the complaint.

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.

The Associated Press wire services contributed to this report.