Image caption The gunman demanded an audience with senior police officers

A five-hour stand-off in Pakistan's capital, Islamabad, has ended with a gunman being arrested.

The gunman was shot in the leg by police after a politician had tried to disarm him and was himself shot.

The life of the politician, Zamurd Khan, does not appear to be in danger.

The gunman was in a car with a woman and two children when stopped for a traffic violation. He began firing two weapons indiscriminately and refused to leave the car or give up the arms.

The man was named simply as Sikandar.

The others in the car were said to be his wife and children. She has been arrested and the children were reported to be in "safe custody".

Media reports quoted the police as saying they wanted at all costs to prevent any death, on instructions of the interior ministry.

The stand-off closed a part of central Islamabad. It was screened live on at least two Pakistani television stations.

The BBC's Charles Haviland in Islamabad says that police originally stopped the man for driving on the wrong side of the street.

The man then got out of his car and - using his wife as an intermediary to pass on notes to police - began swinging his weapons around and demanding to see senior officers.

Onlookers

"I am against vulgarity and immorality. My associates have taken up positions in the whole of Pakistan," he told a local TV channel while making various other incoherent demands.

Our correspondent says there was strong criticism on Twitter of some TV channels for giving him so much publicity and for interviewing him live.

Hundreds of onlookers gathered in the central Jinnah Avenue and occasional gunshots resounded in the air.

A neighbour told TV that the gunman's house had been packed up and that he had hired the car at the centre of the stand-off.

Correspondents say that security has been tight in Islamabad after police were warned about possible attacks by militants based in tribal areas on the border with Afghanistan.

Checkpoints manned by armed police are located at most major access points into the city, which is home to most government buildings and diplomatic missions.

Correspondents say that questions are now certain to be asked as to how the gunman managed to breach security and paralyse the city centre.