LAS VEGAS (AP) – A British man arrested at a Donald Trump rally in Las Vegas tried to grab a police officer’s gun so he could kill the presidential candidate after planning an assassination for about a year, authorities said.

Michael Steven Sandford, 20, approached an officer at the campaign stop last weekend to say he wanted Trump’s autograph but then tried to take the weapon, U.S. Secret Service agents said.

A criminal complaint filed Monday in U.S. District Court in Nevada charges Sandford with an act of violence on restricted grounds. He has been denied bail and has not entered a plea yet.

His court-appointed attorney said he was living out of his car and was in the country illegally after overstaying a visa.

Donald Trump’s son praised local authorities and the Secret Service for stopping the attempted attack, though he didn’t say if there would be any security changes on the campaign trail.

“I think you can only plan for so much,” Donald Trump Jr. said Tuesday on “Good Morning America.” ”You can’t plan for every scenario, and I think (law enforcement) do try to do whatever they can to prevent those things, and I think they will, but I think this is an unusual circumstance.”

The arrest happened relatively quietly at a campaign stop seen as peaceful compared with the mayhem at the presumptive Republican nominee’s recent events in San Jose, California, and Albuquerque, New Mexico.

Sandford grabbed the handle of an officer’s gun while trying to remove it from a holster, the criminal complaint said. Those attending Saturday’s rally at the Treasure Island casino on the Las Vegas Strip passed through metal detectors manned by Secret Service, police and casino security officials.

Sandford told officers he was convinced he would die in the assassination attempt. He said he also reserved a ticket for a Trump rally in Phoenix, scheduled for later Saturday, as a backup plan.

Authorities 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 Thursday.

He said he went to a 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.

Federal Magistrate Judge George Foley said in court Monday that Sandford was a potential danger to the community and a flight risk. Sandford wore leg irons and appeared to tremble during the hearing.

Public defender Heather Fraley said Sandford has autism and previously attempted suicide. He does not have a job. Sandford’s mother told court researchers that he was treated for obsessive compulsive disorder and anorexia when he was younger and that he once ran away from a hospital in England, Fraley said.

Sandford’s attorney argued that her client should go to a halfway house because he didn’t have a criminal history, but the judge said he should stay behind bars ahead of a July 5 court date.

Gregg Donovan, who was among about 1,500 who gathered to see Trump, recognized Sandford from news reports because the two had stood in line together for nine hours. They spoke, but Sandford didn’t say much and seemed “strange,” Donovan said, without elaborating.