President Barack Obama was not on the premises when the incident took place at around 3:06 pm (1906 GMT). He had gone to play golf at Joint Base Andrews, just outside the capital.
The Secret Service reported an “adult male subject, carrying a firearm, approached an outer perimeter checkpoint accessible to the general public,” according to spokesman Robert Hoback.
“Secret Service Uniformed Division 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.”
He received emergency medical attention and was taken to a hospital for treatment.
The incident prompted the White House doors to be locked and agents in full tactical gear and brandishing automatic and heavy-caliber weapons were deployed around the complex and Lafayette Square to the north.
The normal throng of tourists were pushed back well away from the building.
A White House official said “no one within or associated with the White House was injured, and everyone in the White House is safe and accounted for.”
“The president has been made aware of the situation.”
Another official said that Vice President Joe Biden had been at the White House complex at the time of the shooting, but was “secure.”