A Secret Service agent shot and critically wounded a man Friday afternoon who approached a guard booth outside the White House and refused to put down the pistol he was carrying, according to law enforcement officials.

Lines of tourists were frantically ushered away from the area as heavily armed police converged on the security shack near 17th and E streets NW, which is outside the secure perimeter and accessible to the public. The White House was put on lockdown, and Vice President Biden was secured inside the complex, authorities said. President Obama was golfing at Joint Base Andrews at the time.

Authorities said the man, who was shot once in the chest, was hospitalized in critical condition Friday night. Two law enforcement officials identified him as Jesse Olivieri, a Pennsylvania man in his 30s. His relatives could not immediately be reached to comment.

Police released no other details about him or an apparent motive. Authorities discovered ammunition for a .22-caliber weapon inside the man’s white, four-door sedan, which was parked near the scene, according to two law enforcement officials.

Friday’s apparent attempt to breach the White House grounds is another in a series of security incidents in recent years at or near the presidential complex. It took place against a backdrop of heightened global tension brought on by terrorist attacks and the ongoing wars in the Middle East and Afghanistan and as officials were investigating the crash of an Egyptian passenger jet over the Mediterranean Sea.

1 of 23 Full Screen Autoplay Close Skip Ad × Photos from the scene after a person was shot near the White House View Photos A Secret Service officer shot and wounded a man who brandished a gun Friday afternoon, according to several law enforcement officials. U.S. Park Police tweeted that a shooting occurred after 2 p.m. on West Executive Drive. Caption A Secret Service officer shot and wounded a man who brandished a gun Friday May 20, according to several law enforcement officials. U.S. Park Police tweeted that a shooting occurred after 2 p.m. on West Executive Drive. May 20, 2016 A Secret Service agent orders people into buildings near the entrance to the West Wing of the White House after it was placed on security alert because of a shooting on a street outside. Andrew Harnik/AP Buy Photo Wait 1 second to continue.

Law enforcement officials said there was no immediate sign that Friday’s incident, which occurred just after 3 p.m., had any links to terrorism.

The Secret Service said in a statement that the man approached the security gate holding a gun and that “officers gave numerous verbal commands for the subject to stop and drop the firearm. When the subject failed to comply with the verbal commands, he was shot once by a Secret Service agent and taken into custody.”

Officials said they recovered the man’s firearm.

Baltimore resident Akil Patterson, who was in a security line for the Eisenhower Executive Office Building, said he saw an officer come through a side door and overheard radio chatter: “Shots, shots fired, suspect down, suspect down.”

Jaspreet Singh said a friend, Ranjit Singh, texted him that: “A cop shot a guy.” In his text, the friend said he saw a man with a gun in his right hand walking toward a police officer before he was shot.

Federal agents with the Washington field office of the Bureau of Alcohol, Tobacco, Firearms and Explosives were helping to trace the weapon, according to an agency spokesman. Officials said that the man’s car was found parked near 17th Street and Constitution Avenue NW, and an officer spotted the ammunition through a window.

Law enforcement officials noted that the man did not gain access to the White House complex. After the incident, police blocked streets between 16th and 17th Streets NW, along with parts of the Mall near the Washington Monument. A helicopter circled overhead as tourists, office workers and people with White House appointments were quickly ushered away.

Lock down at the White House has been lifted after a nearby shooting. (Dalton Bennett/The Washington Post)

People have tried to reach the mansion’s grounds for years for a wide variety of reasons. Some suffered mental illness, others wanted to make a political statement and some sought notoriety. One person this year allegedly climbed the fence to try to escape apprehension in a series of robberies he had just committed.

The Secret Service last year added small spikes — or “pencil points” — to the top of the six-foot fence that surrounds the White House complex after a series of incidents in which intruders climbed the fence. Last month, the agency announced a plan to raise the height of the security fence to 11 feet by 2018.

Perhaps the most serious breach was on Sept. 19, 2014, when Omar Gonzalez climbed over the north fence and made his way deep into the White House. When he was finally tackled by an off-duty Secret Service agent in the ornate East Room, he was found to have a knife in a pants pocket. Two hatchets, a machete and 800 rounds of ammunition were found in his car nearby. Secret Service Director Julia Pierson resigned two weeks later.

But there have been recent incidents as well. Last month, a man threw his backpack over the north fence and climbed over. He was immediately arrested. On March 7, a man in a hoodie climbed over a smaller first barrier but was tackled and arrested before he could reach the fence. And in November, a college student draped in an American flag climbed over the spiked White House fence while the first family was inside the residence celebrating Thanksgiving.

Friday’s shooting was being investigated by several federal agencies, though by evening, D.C. police had assumed command because of involvement by a law enforcement officer. The Secret Service will determine whether the shooting met its standards for using deadly force; D.C. police, along with prosecutors, will investigate whether any laws were broken.

The sound of gunfire and the cadre of law enforcement that blanketed downtown Washington shattered the calm of one of the few warm, sunny days the area has experienced in weeks.

Jason Wilson, visiting from Detroit to collect a President’s Volunteer Service Award, said he heard one shot while he and colleagues were standing near 17th and F streets NW.

“We were hoping it was a blown tire, but it wasn’t,” he said. “Within a few seconds, police were rushing down the street, telling us to move away.”

Trabian Shorters, head of an advocacy group whose members were waiting in line to enter the Eisenhower Executive Office Building, was also among those in the area.

“They started yelling for everyone to clear the canopy and get to the street,” Shorters said. “They were very emphatic. It was clearly very serious.”

Juliet Eilperin, Carol D. Leonnig, Josh Hicks, Joe Heim, Matt Zapotosky and Julie Tate contributed to this report.