A Briton who tried to grab a police officer's gun at a Donald Trump rally in Las Vegas said he wanted to shoot the US candidate, court papers say.
Michael Steven Sandford, 20, did not enter a plea when he appeared before a judge in Nevada and was remanded in custody until a hearing on 5 July.
He is charged with an act of violence in a restricted area.
He had reportedly tried to seize the gun after saying he wanted Mr Trump's autograph at Saturday's rally.
He said he had been planning to try to shoot Mr Trump for about a year but had decided to act now because he finally felt confident enough to do so, court papers say.
Mr Sandford is reported to be from Dorking, in Surrey.
He had originally travelled to the US to see a girlfriend, the Evening Standard reports, citing a friend of his mother.
A federal judge found Mr Sandford, who reportedly appeared in court in shackles, to be a danger and risk of non-appearance, and he was ordered detained pending his preliminary hearing.
When asked about the arrest of Michael Sandford, a Foreign Office spokesman said: "We are providing assistance following an arrest of a British national in Las Vegas."
The charge relates specifically to breaches of an area where someone protected by the Secret Service is visiting,
Earlier on Monday, Mr Trump fired his campaign manager, Corey Lewandowski, who oversaw his triumph in the primary contests.
Dark memories of 1968: James Cook, North America correspondent, BBC News
The US presidential election campaign of 2016 has been fringed with violence. Almost everywhere Donald Trump goes he attracts protests.
The tycoon often mocks the demonstrators and there have been clashes with his supporters, both inside and outside of his packed, emotionally charged rallies. For some, the violence has stirred dark memories of 1968 when Democratic presidential contender Robert Kennedy was assassinated and riots broke out at the party's convention in Chicago.
This year events have not descended to those awful depths but still, the country feels edgy and the Secret Service, which guards candidates as well as presidents, has been on high alert.
In March in Ohio agents swarmed around Mr Trump after a man apparently attempted to climb on to the stage where he was speaking. Other events have been cancelled because of security concerns. With five months to go, many Americans are worried about where this election is heading.
'Expected to be killed'
According to the court papers, Mr Sandford said he had never fired a gun before but went to a range in Las Vegas on 17 June to learn how to shoot.
At Saturday's rally at the Treasure Island Casino, he allegedly tried to grab the officer's weapon because it was in an unlocked position and therefore, he said, the easiest way to get a gun to shoot Mr Trump.
Court documents say Mr Sandford acknowledged he knew he would only be able to fire one or two rounds, and expected to be killed during an attempt on Mr Trump's life.
He told police if he had not tried to kill Mr Trump at this rally he would have tried again at a rally in Phoenix, for which he had already booked tickets, the papers say.
He told investigators he had been in the US for one and a half years and drove to Las Vegas from California specifically to kill Mr Trump, the court papers say.
Court research showed he was unemployed, living out of his car and in the US illegally, the Associated Press news agency reports.
A federal public defender said he had autism and had attempted suicide, the agency adds.
Recent opinion polls suggest Mr Trump is trailing his Democrat opponent Hillary Clinton.
US media focused on the Republican candidate's fundraising woes over the weekend. The Trump campaign had just $1.3m in cash at the start of June, compared with Mrs Clinton's $42 million.
She also has nearly ten times more staff, the New York Times reports.
Mr Trump's former campaign manager says he still supports his candidacy, despite being sacked.
Corey Lewandowski said the billionaire businessman had changed the way American politics was viewed for the better.
Reports in American media say he clashed with the more traditional strategists Mr Trump has hired recently to try to reshape his operation for the November election.
Mr Trump is facing strong resistance from senior members of his own party over his strident tone, hard-line immigration policy and falling poll numbers.
Americans go to the polls on 8 November to elect a president to succeed Democrat Barack Obama, who is stepping down after two terms in office, which have seen the Republicans gain control of both houses of Congress.