Pakistan's new Prime Minister, Shahid Khaqan Abbasi, has called for an investigation into allegations that opposition leader Imran Khan harassed a former female member of his political party.

The newly elected Abbasi on Friday backed moves to form a parliamentary committee to investigate the matter after a group of legislators raised the allegations in the house.

The scandal erupted on Tuesday after Ayesha Gulalai, a National Assembly member from the conservative Khyber Pakhtunkhwa province, announced she was quitting Khan's opposition Pakistan Tehreek-e-Insaf (PTI) party, alleging that he had no respect for women and had sent her obscene text messages.

Khan, a former captain of Pakistan's national cricket team, has denied the allegations and accused ousted leader Nawaz Sharif's ruling Pakistan Muslim League-Nawaz (PML-N) of organising a smear campaign in the run-up to elections next year.

Gulalai announced in Islamabad that "Imran Khan's list of sins is very long" and that she decided to speak out because she does not want to compromise her integrity.

Gulalai has not released any of the alleged text messages.

Social media storm

Abbasi told the National Assembly on Friday that 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.

The accusations come days after Pakistan's Supreme Court disqualified Khan's long-time political rival Sharif for lying on a wealth declaration.

Khan held a rally of his supporters last weekend in the capital Islamabad to celebrate Sharif's removal.

The scandal has evoked a social-media storm and provoked a debate on sexual harassment in Pakistan.

The backlash targeting Gulalai in particular provoked criticism from women's rights activists, who said the claims should be investigated rather than met with threats of violence.

The Amount of severe hate #AyeshaGulalai has Received from the society shows how Intolerant Pakistan's society is Against women.