Donald Trump praised the US Secret Service for doing a "fantastic job" in apprehending a "troubled person" who climbed a fence at the White House while the president was inside the executive mansion.
It was the first known security breach at the White House since Mr Trump took office nearly two months ago.
Washington DC police identified the intruder as Jonathan Tran, 26, of Milpitas, California.
When approached by a Secret Service officer on the south grounds on Friday night and asked whether he had a pass authorising him to be in the restricted area, Tran replied: "No, I am a friend of the president. I have an appointment," the police report said.
Asked how he got there, he said he "jumped the fence".
The Secret Service said in a statement that the intruder, whom it did not identify, had climbed an outer perimeter fence near the Treasury Department and East Executive Avenue. He was arrested without further incident and no hazardous materials were found in his backpack, the agency said.
Authorities found two cans of Mace on Tran, including one inside his jacket pocket, according to a criminal complaint filed in US District Court. Tran was also carrying a US. passport, an Apple laptop computer, a book written by Mr Trump and a letter he had written to the president, the complaint said.
"Secret Service did a fantastic job last night," Mr Trump said from his golf club in Northern Virginia. He described the intruder as a "troubled person" and the situation as "very sad". Mr Trump was briefed on the matter on Friday night, said his spokesman, Sean Spicer.
Homeland Security Secretary John Kelly was also briefed on the incident, the Secret Service said. Mr Kelly was among several Cabinet secretaries and senior White House staff members who attended a working lunch with the president at the Trump National Golf Club.
In the letter found on Tran, he mentioned "Russian hackers" and said he had information of relevance, according to the criminal complaint. He alleged that he had been followed, that his phone and email communications had been read by third parties, and that he has been called schizophrenic.
The Secret Service said a search of the north and south White House grounds found "nothing of concern to security operations". Standard practice is to turn intruders over to the local police department.
Video surveillance footage shows Tran jumping a fence near the Treasury Department adjacent to the White House security fence, the complaint said. At one point, Tran is seen hiding behind a White House pillar before proceeding to the South Portico entrance.
Friday's security breach follows a series of similar lapses that took place during the eight years that Barack Obama was president. An especially embarrassing breach came in September 2014 when an Army veteran with mental health issues scaled a fence on the Pennsylvania Avenue side of the White House and made it deep inside the building, to the East Room, before the Secret Service could detain him.
The Obamas were not at home at the time. The incident was one of several breakdowns by the Secret Service that ultimately led to the resignation of the agency's director, Julia Pierson, the following month.
Mr Trump has to find someone new to lead the agency after Joseph Clancy, a former agent who came out of retirement to succeed Ms Pierson and stabilise the law enforcement agency, announced his second retirement last month.
Mr Trump said he brought the Cabinet secretaries, White House staff and some of their spouses to the club for a working lunch to discuss the military, the economy, health care and other issues.
Besides Mr Kelly, joining Mr Trump were Treasury Secretary Steve Mnuchin, Veterans Affairs Secretary David Shulkin, Commerce Secretary Wilbur Ross, White House chief of staff Reince Priebus, chief strategist Steve Bannon and Mr Spicer. Defence Secretary Jim Mattis was absent.
"We're having some great discussions," Mr Trump said.
"The economy is doing very, very well. Generally speaking we're doing very well."
He talked about inheriting "a mess" when he took office, but said everything would be "straightened out fast".