(Releads with arrest)
ISLAMABAD, Aug 15 (Reuters) - An armed man demanding the establishment of Islamic rule in Pakistan opened fire in the heart of Islamabad on Thursday and was arrested hours later after a standoff with police that was broadcast live on television.
Arriving as night fell, the man drove a car, which also contained two children and a woman believed to be his wife, into the tightly guarded city centre, stopping near the president's official residence and firing into the air.
Security has been tight in the city after police received an alert about possible attacks by militants operating from the tribal areas on Pakistan's lawless border with Afghanistan.
The man, armed with two automatic rifles, seemed confused in his demands, firing random shots into the air as hundreds of onlookers gathered in Jinnah Avenue, a central thoroughfare.
"I am against vulgarity and immorality. My associates have taken up positions in the whole of Pakistan," he told a TV channel.
He was arrested several hours later after again firing into the air as a senior politician approached him for negotiations. Both the gunman and the woman were wounded.
The gunman appeared to act on his own with no clear political agenda but questions were asked about how a lone armed attacker managed to paralyse the city centre and cause a standoff with an anti-terrorist unit.
Checkpoints and police armed with assault rifles dot many access points in Islamabad, where attacks have become rare since the 2008 bombing of the Marriott Hotel. Security has been tightened further in recent weeks, particularly in the centre where most ministries and embassies are located.
Last week, the U.S. government ordered the evacuation of non-essential staff from its consulate in the northeastern Pakistani city of Lahore due to the threat of attack. (Reporting by Maria Golovnina and Syed Raza Hassan; Editing by Robin Pomeroy)