A provincial court in India has lifted a ban imposed earlier this month on the video-sharing app TikTok. The decision is a relief to Chinese startup ByteDance, which owns the app.

The Madurai Bench of the Madras High Court lifted the ban subject to the condition that pornographic videos and those that include children or women being abused not be uploaded to the site. If ByteDance fails to adhere to those stipulations, the court warned that it would initiate contempt proceedings.

The same bench issued an order on April 3 directing the Indian federal government to ban the Tik Tok Mobile App from being downloaded. Judges said there was the risk of people accessible inappropriate content such as abusive language or pornography being posted on the app.

ByteDance, which is backed by SoftBank Corp, won an order from the Indian Supreme Court against the Madras High Court ruling. On Monday the Supreme Court asked the High Court to decide on the petition against the app on April 24, or the ban on the app would be automatically vacated.

The matter was again heard on Wednesday by the Madurai Bench of the Madras High Court, and led to the lifting of the order under the conditions noted above.

TikTok informed the court that the app will shut automatically if a user tries to upload a video with objectionable content. The company said it has created a three-layer system, including one based on artificial intelligence, as well as manual deletion to take care of such instances.

It said that nearly six million controversial videos had been deleted. The firm also said it would appoint an officer to address any complaints.

The ban in India was reportedly taking a heavy toll on ByteDance, which had claimed it was facing a loss of up to US$500,000 a day and more than 250 jobs were at risk.