Pakistan's new interior minister said Tuesday the country needed better laws to regulate internet free speech, as disruption of social media platform X stretched into its fifth week.

Islamabad has declined to clearly say whether it is behind nationwide restrictions to the platform, formerly known as Twitter, which have left it rarely accessible since February 17.

Pakistan's polls earlier that month were marred by allegations of rigging, and the outages began after a senior government official made a public admission of vote tampering.

"We need to make better laws," Interior Minister Mohsin Naqvi said when asked whether his ministry was responsible for the X shutdown.

"Expression is fine, but making false allegations against people is wrong -- it's happening and needs to be fixed."

"We must reassess our own laws and look into what is being misused," he told reporters in remarks broadcast on state TV.

X, Facebook, Instagram and TikTok were key planks in the election campaigning of jailed ex-prime minister and popular opposition leader Imran Khan.

The former cricket star was barred from running and his Pakistan Tehreek-e-Insaf (PTI) party was subject to a sweeping crackdown of arrests and censorship ahead of February 8 polls.

Most of their campaigning moved online, where it was shut down by numerous social media blackouts which Islamabad blamed on technical glitches.

Rigging claims were also fuelled by a nationwide mobile internet shutdown on polling day, which the caretaker government said was required for security reasons after twin bombings killed 28 a day earlier.

X remained unavailable to AFP reporters in Islamabad, Peshawar and Lahore on Tuesday afternoon -- but the site has been momentarily accessible at times over the past five weeks.

"The problem is there is no transparency by the government," said Sadaf Khan, an analyst for Pakistani campaign group Media Matters for Democracy.

"Twitter is being banned specifically because it has emerged as a platform where political disclosure takes place," she told AFP.

Information minister Attaullah Tarar has given mixed signals over disruption, telling one local media outlet it "is working" and another that it was "already banned" when the new government came to power.

Prime Minister Shehbaz Sharif -- who secured the office through a shaky coalition after Khan's candidates defied expectations to secure more seats than any other party -- has frequently published statements on X.

On Monday, he used the platform to congratulate Russian President Vladimir Putin for his re-election in a poll slammed by independent observers and the West as the most corrupt in post-Soviet history.