A Secret Service agent shot a man who brandished a gun near the White House on Friday while President Barack Obama was out golfing, and the man was taken to a hospital in critical condition, officials said.

The Secret Service, which protects the president and his family, briefly locked down the White House as a precaution, and Vice President Joe Biden was secured within the White House complex during the lockdown, a White House spokeswoman said.

The shooting took place just off 17th and E streets, near the South Lawn outside the home and offices of the president.