Venezuela’s highest court on Monday fined TikTok $10 million in connection with viral challenges that authorities say left three adolescents dead from intoxication by chemical substances.

Supreme Tribunal of Justice Judge Tania D’Amelio said that the popular video-sharing app had been negligent in failing to implement “necessary and adequate measures” to stop the spread of content encouraging the challenges. TikTok, which is owned by China’s ByteDance, was ordered to open an office in the South American country and given eight days to pay the fine or face “appropriate” measures.

Venezuela would use the money to “create a TikTok victims fund, intended to compensate for the psychological, emotional and physical damages to users, especially if these users are children and adolescents,” D’Amelio said.

The company told the court that it “understands the seriousness of the matter,” she said.

According to Venezuelan authorities, three adolescents died and 200 were intoxicated in schools across the country after ingesting chemical substances as part of social media “challenges.”

In November, President Nicolas Maduro threatened “severe measures” against TikTok if it did not remove content related to what he called “criminal challenges.”