A man has appeared before a judge in Washington DC after being arrested for jumping over the White House fence at midnight, telling the secret service: “I am a friend of the president”.

The man, identified as Jonathan Tran, 26, was carrying a rucksack as he breached the security perimeter at 11:38pm on Friday night. Prosecutors said the rucksack contained two cans of mace and a passport.

He made his way across the grounds and got close to the South Portico entrance, before he was stopped.

“No,” he reportedly told secret service. “I am a friend of the president. I have an appointment."

Mr Trump was in the White House at the time, and was informed after the incident.

The suspect had no arrest record or history with the agency charged with protecting the president, his family and other elected officials, the service said in a statement.

The day after all was calm at the White House, with the president heading off on Saturday afternoon for a round of golf at his own course in Virginia.

Mr Trump described Tran as "a troubled person", and thanked the service for apprehending the intruder.

"Secret Service did a fantastic job," he said, speaking at the start of a working lunch with several Cabinet members at his golf course outside Washington.