Assembly members from Imran Khan's party have resigned from Pakistan's parliament to pressure the prime minister to step down over what they claim is electoral fraud.

The cricketer-turned-politician's Tehrik-e-Insaf party won 34 seats in the 342-member National Assembly, or lower house of parliament, in the 2013 elections that brought premier Nawaz Sharif into power.

Arif Alvi said he had handed over the resignations to the assembly secretary in Islamabad as the speaker was not present at the time.

Under law, the speaker accepts resignations after assuring that the assembly members in question did not quit under pressure.

Mr Khan, along with thousands of his supporters, has been demonstrating outside parliament since Tuesday to pressure Mr Sharif's government to step down.

The move came a day after parliament presented a united front against Mr Khan, with opposition parties backing a resolution rejecting his calls for Mr Sharif's resignation as unconstitutional.

Mr Khan and popular cleric Tahir-ul-Qadri have led twin protests over the past week calling on Mr Sharif to step down.

Thousands of their supporters have gathered in the heart of Islamabad, in the so-called red zone housing government buildings. They accuse Mr Sharif of rigging the election that brought him to power in the first democratic transition in Pakistan's history.

Mr Khan and Mr Qadri have called for electoral reforms and the appointment of a caretaker government to hold a new vote. The ruling Pakistan Muslim League-N party has said it is willing to discuss all of their demands except for the prime minister's resignation.

In recent days, Mr Khan had issued a series of ultimatums calling on Mr Sharif to step down, and at times it seemed his protesters might besiege parliament or enter the premier's nearby office.

But now he appears to have backed down.

"We resigned from the National Assembly as we believe that the elections were not transparent," Mr Alvi said.

Sadiqul Farooq, a spokesman for the ruling party, said there was no threat to the government, which retains the support of a 190-member majority.

Mr Khan's party held initial talks with the government yesterday but later pulled out, saying authorities were planning a crackdown on the protests.

The government insisted it had no plans to confront the demonstrators and wants to resolve the dispute through negotiations.