WASHINGTON — An intruder with a backpack was arrested on the South grounds of the White House late Friday after scaling a perimeter fence, according to a statement from the Secret Service.

President Trump was in the residence at the time, but was not at risk, according to a law enforcement official who was not authorized to comment publicly.

The Secret Service said the incident occurred at about 11:38 p.m. when the individual scaled an outer perimeter fence by the Treasury Building and East Executive Avenue.

The suspect, whose identity was not immediately disclosed, was carrying a backpack, which was screened and "found to be free of any hazardous materials," the Secret Service statement said. The individual was arrested by officers of the Secret Service Uniformed Division without further incident.

CNN, which initially reported the incident, said the intruder was discovered when officers "bumped into" the individual near the South Entry of the executive mansion. CNN's Jeff Zeleny reported that the suspect, who had not been detected until that encounter, told the officers, "No, I am a friend of the president. I have an appointment."

Homeland Security Secretary John Kelly was briefed on the incident, according to the Associated Press.

The South grounds of the 18-acre White House complex is on the side nearest the Washington Monument and is where Marine One lands and takes off.

In the summer of 2015, sharper spikes were added to the fence surrounding the perimeter to discourage intruders. And last spring, the Secret Service proposed a new design with "intrusion detection technology."

Other notable incidents:

• On April 1, 2016, an individual who scaled the White House fence after throwing a backpack over it was taken into custody by Secret Service agents.

• On March 7, 2016, Secret Service officers tackled and arrested a man in a hoodie who apparently tried to breach the White House fence.

• On Thanksgiving Day 2015, the Secret Service apprehended a White House fence jumper who said he was trying to deliver a message.

• On Jan. 26, 2015, a government employee told the Secret Service that he lost control of a small drone before it crashed on the grounds of the White House. The perimeter was locked down for a time period as officials examined the drone.

• On Oct. 22, 2014, a man jumped the fence on the north lawn and was quickly taken down by security dogs before being arrested by the Secret Service.

• On May 23, 2014, Secret Service officers arrested a man who had stripped himself of all his clothing outside the White House. He was charged with assault and indecent exposure.

• On Nov. 11, 2011, a man fired a semiautomatic rifle at the White House. He had called President Obama "the anti-Christ." One bullet had struck an upstairs window, but was stopped by bulletproof glass, according to the Secret Service. The president wasn't in the White House at the time

• On Sept. 11, 2014, a man wearing a Pikachu hat (from a fictional character in a video game) scaled the fence and entered the North Lawn where he was arrested.

Contributing: Susan Miller in Washington