Image copyright EPA Image caption Mr Khan has come under pressure from other opposition leaders to end his "unconstitutional" protests

Pakistan's main opposition leader Imran Khan says he is pulling out of talks with the government until Prime Minister Nawaz Sharif resigns.

The two sides began discussions last night, after thousands of opposition supporters occupied a high-security zone in front of parliament.

Protesters say Mr Sharif came to power through electoral fraud.

Parliament had declared Mr Khan's week-long political campaign to bring down the prime minister unconstitutional.

Both Mr Khan, the leader of the PTI party, and Tahirul Qadri, who heads the PAT party, are demanding the resignation of PM Nawaz Sharif.

Mr Sharif's party won last year's elections by a landslide in what was Pakistan's first peaceful transfer of power between two civilian democratic governments.

He denies allegations of corruption or electoral vote-rigging.

Image copyright AP Image caption The protests have remained peaceful so far but there are fears the military could intervene in the crisis

Media playback is unsupported on your device Media caption The BBC's Pakistan correspondent, Shahzeb Jillani, asked Mr Khan if his protests could derail Pakistan's fragile democracy

Mr Khan's party said it had presented six demands - which included the resignation of Mr Sharif - for continuing the discussions with the government. The government said these demands had no legal basis.

Both Mr Khan and Mr Qadri, an anti-government cleric, have been summoned to appear before the Supreme Court later on Thursday to explain the protests.

A week-long campaign in an attempt to bring down the government culminated in thousands of protesters breaching security to enter Islamabad's "red zone" on Tuesday.

The high-security area of the capital contains several key government buildings, including parliament, and foreign embassies.

Soldiers guarding the zone showed no resistance to the crowds of protesters and instead called on both sides to hold talks to end the impasse.

MPs were forced to use a rear exit to leave the parliament building on Wednesday.

The government has accused protesters of attempting to derail democracy and both protest leaders have been criticised for their "unconstitutional" actions by other opposition leaders.

Although both protest movements are calling for Mr Sharif's resignation, they are not formally allied.

Correspondents say that if one group reaches a settlement with the government, the other's protests would be severely weakened.

The demonstrations have remained peaceful so far but the crisis has raised fears that Pakistan's military could intervene if the government proves unable to bring the protests under control.