The White House was on lockdown for a short time Saturday afternoon after a Secret Service officer spotted a man walking nearby with a weapon.

A spokesperson for the United States Secret Service said the officer noticed the man with a weapon in a holster about 1:12 p.m. while walking on Pennsylvania Avenue near Madison Place, on the eastern side of Lafayette Park.

The officer confronted the suspect and there was a brief struggle before the officer arrested him.

The suspect has been charged with carrying a firearm without a license, carrying unregistered ammunition, resisting arrest and committing a crime while wearing a mask.

The White House returned to normal operations after the suspect was taken to the Metropolitan Police Department.

President Barack Obama was not at the White House at the time. He was in Maryland, playing golf at Andrews Air Force Base.