Michael Sandford, a British man living in the U.S., was arrested on Saturday inside the theater at the Treasure Island Hotel and Casino, where Trump was holding a rally.

According to the Las Vegas Municipal Police Department, Sandford approached a uniformed Las Vegas officer indicating he wanted Trump’s autograph. As Sandford and the officer talked, Sandford attempted to take the officer’s gun, police said.

Other officers arrested Sandford, and the event was not disrupted, police said. The teen was turned over to the Secret Service, and on Monday, federal prosecutors charged him with an act of violence on restricted grounds.

Sandford is a U.K. citizen and told authorities he had been living in the U.S. for about a year and a half, according to court documents. He was in California earlier this week, and on Wednesday, he drove to Las Vegas after learning Trump was holding a rally there.

“Sandford then revealed that he made a conscious effort to come to Las Vegas to kill Trump,” a Secret Service agent said in court records.

Sandford told the agent that he on Thursday visited a gun range to practice firing a 9 mm handgun, the first gun he had ever fired. He added he targeted the officer after noticing his holster was unlocked and used both hands to try to grab the gun, the records said.

“Sandford further stated that if he were on the street tomorrow, he would try this again,” the agent reported. “Sandford claimed he had been planning to attempt to kill Trump for about a year but decided to act on this occasion because he finally felt confident about trying it.”

Police remove a man as Republican presidential candidate Donald Trump speaks at the Treasure Island hotel and casino.

Sandford had also booked a ticket for the Saturday Trump rally in Phoenix, in case he was unable to try to kill Trump in Las Vegas, he told the Secret Service.

A federal judge on Monday denied bail for Sandford, the Associated Press reported. Sandford had been living out of his car and was in the U.S. illegally, the AP reported. A federal public defender told the AP that he has autism and previously attempted to kill himself.