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 "on restricted grounds".
He had reportedly tried to seize the gun after saying he was seeking 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.
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."
Earlier on Monday, Mr Trump fired his campaign manager, Corey Lewandowski, who oversaw his triumph in the primary contests.
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
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, 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.
There were reports over the weekend that Mrs Clinton's campaign was ahead in spending in key swing states.
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.