 -- An intruder scaled a White House fence Friday night and allegedly made it close to the South Portico entrance before he was apprehended, according to court documents.

The individual, later identified as Jonathan Tuan-Anh Tran, 26, of Milpitas, California, scaled the South Grounds fence at the White House at approximately 11:38 p.m., according to the U.S. Secret Service. The intruder, who was carrying a backpack, was arrested by Secret Service officers, who also searched the backpack as a precautionary measure.

The president, who had no public events Friday night, was at the White House at the time.

According the arrest affidavit, Tran was observed, "walking form the east side of the south grounds of the White House Complex," and then "walking close to the exterior wall of the White House Mansion ... approaching the South Portico Entrance to the White House Mansion."

According to the complaint, video surveillance footage shows Tran jumping a fence near the Treasury Building next to the White House and at one point Tran is allegedly seen hiding "behind a White House pillar before proceeding to the South Portico Entrance."

When he saw the uniformed Secret Service Officer, he changed course and headed toward the South Lawn, away form the White House.

When he was stopped, he told the officer, "I am a friend of the President. I have an appointment." When asked how he got there, he said, "I jumped the fence."

Tran was carrying two cans of mace, one in his pocket and one in his jacket. He also carried a U.S. passport, and Apple laptop, a book written by President Trump, and a letter he had written to the president.

In the letter, Tran allegedly mentioned "Russian Hackers," that he had been followed," that his :phone and email communication [had been] read by third parties." The letter also allegedly stated he had "been called schizophrenic."

Tran made his first court appearance in Superior Court of the District of Columbia this afternoon on a charge of entering or remaining in restricted grounds while using or carrying a dangerous weapon. Accordng to prosecutors, Tran was carrying two cans of mace in his backpack.

His court appointed attorney, Gregg Baron, argued for his release until his next court appearance.

The judge ruled Tran was a flight and safety risk, and ordered him held until Monday, when he is scheduled to make make an appearance in the U.S. District Court for the District of Columbia.

The south and north grounds of the White House complex were then searched by Secret Service officers who found nothing of concern to security operations.

When President Trump was asked about the fence jumper on Saturday, he commended the Secret Service, adding that the person was "troubled."

"The service did a fantastic job. It was a troubled person. It was very sad," the president said.

Department of Homeland Security Secretary John Kelly was fully briefed on the incident, the statement said.