A man wearing a mask and carrying a gun was arrested outside the White House on Saturday.

The unidentified suspect was confronted by a Secret Service agent as he walked along Pennsylvania avenue, prompting staff to put the building on lockdown.

There was a struggle between the agent and the man near Madison Place, on the eastern side of Lafayette Park.

A U.S. Secret Service officer walks the grounds after a man spotted near the White House with a gun prompted a lockdown

The man was placed under arrest and turned over to the local police department.

He faces several charges, including carrying a firearm without a license, carrying unregistered ammunition and resisting arrest.

President Barack Obama was not at the White House at the time.

He was in Maryland, playing golf at Andrews Air Force Base.