A man wielding a gun was arrested from outside the Parliament House in Islamabad on Monday, officials said.
Television footage showed the man walking frantically on a main road, waving a pistol in one hand and what seemed like a knife in the other, as several security officials appeared to surround him.
Police said the arrested man was shifted to Secretariat police station and a pistol was confiscated from him.
Later, Interior Minister Sheikh Rashid Ahmed said during a press conference that the weapon confiscated from the man had no bullets inside. He confirmed that the police had arrested the man, adding that further investigation on the matter was under way.
According to police, the man has been identified as a 45-year-old resident of Chakri, Islamabad.
Police said the man seemed to be suffering from a mental illness and his records were being checked.