Pakistan's new prime minister on Friday called for an investigation into allegations that opposition leader Imran Khan harassed a woman lawmaker, charges Khan dismisses as revenge for his role in last week's ouster of then-premier Nawaz Sharif.

A furious social media backlash threatening violence against Khan's accuser, lawmaker Ayesha Gulalai, has also exposed raw nerves about the treatment of women in Pakistan.

The case has been splashed across domestic media, at times eclipsing the installation of a new cabinet led by Sharif ally Shahid Khaqan Abbasi as prime minister.

Abbasi told the National Assembly he wanted a special panel to investigate the allegations.

"We respect the person who has made the accusation, but we also respect the accused, and it is their right to be able to contest these allegations," he said.

On Tuesday, at a news conference at the National Assembly, Gulalai had announced she was quitting Khan's opposition Pakistan Tehreek-e-Insaf (PTI) party, saying he had no respect for women and had sent her obscene text messages.

The announcement, four days after the Supreme Court disqualified Sharif over undeclared income he denies having received, in a case Khan brought before the court, prompted PTI supporters to accuse her of working for the ruling party.

"The PML-N has used her and bought her. This is the tried and tested method of the PML-N," Khan told a private television channel on Thursday, referring to the ruling party.

"I have worked with numerous women in my career," he added, rejecting the accusations. "How many women have levelled such allegations against me?"

Reuters could not immediately reach Khan, the PTI chairman, for comment on Friday, but a party spokeswoman said a statement could come later in the day.

Gulalai told Reuters she stood by her allegations, adding that she was not surprised at the threats.

"In our society, it is common that a victim is targeted, always, and if you're a woman you hardly find anyone to stand by you," she said in a telephone interview on Thursday.

Khan accuses the ruling Pakistan Muslim League-Nawaz party and what he called the Sharif family "mafia" of waging a revenge smear campaign against him, in preparation for general elections due next year.

"Do your worst; stoop as low as you can; me and my struggle-hardened party will become ever stronger," Khan said on social network Twitter in a message to the Sharif family "mafia".