LAS VEGAS (CBSNewYork/AP) — A British man arrested at a Donald Trump rally in Las Vegas told authorities he tried to grab an officer’s gun so he could kill the candidate, the Secret Service said.

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

Federal Magistrate Judge George Foley on Monday declined to grant bail to Sandford. Foley said Sandford was a risk to the community and a flight risk.

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.

COMPLETE CAMPAIGN 2016 COVERAGE

He 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, New Jersey, and drove to the San Bernardino, California, area before coming to Las Vegas on June 16.

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.

Sandford told officers he had been planning an assassination for about a year and was convinced he would die in the attempt. CBS News reports Sandford put the plan into motion because he finally felt confident about trying it. 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.

Trump has had Secret Service protection for the past eight months.

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)