Islamabad: Pakistan has lifted a second ban imposed on TikTok over “immoral and unethical” content after the popular video-sharing app again offered to moderate uploads.

A court in the northwestern city of Peshawar last month ordered the communications regulator to block the app over videos it deemed contrary to the conservative country’s moral values.

At the hearing, senior agency official Tariq Gandapur said contact had been established with TikTok to ensure those who share “vulgar” content are blocked.

The app, owned by China-based ByteDance, has been downloaded almost 39 million times in Pakistan.

“The app has assured us it will filter and moderate content,” Jahanzeb Mehsud, a lawyer for Pakistan Telecommunications Agency, told AFP news agency.

The Chinese-owned platform – wildly popular among Pakistani youth, particularly in rural areas – had also agreed to moderate content after the first brief ban in October.

One of Prime Minister Imran Khan’s advisers blamed it for promoting the “exploitation, objectification and sexualisation” of young girls.

“We are pleased that TikTok is once again available to our community in Pakistan,” it said in a statement, adding that it is committed “to promote a safe and positive community online”.

Freedom of speech advocates have long criticised the creeping government censorship and control of Pakistan’s internet and printed and electronic media.

Last year, Pakistani regulators had asked YouTube to immediately block all videos they consider “objectionable” from being accessed in the country, a demand criticised by rights campaigners. Pakistan and China are close allies in the region.