A 4-year-old girl from the Philippines "almost lost her life" after she tried to hang herself while imitating a TikTok video.

In a Facebook post, the mother of the girl said her daughter watched the TikTok video and decided to imitate it.

"She saw a video of a kid hanging him/herself and then she tried copying it using the Venetian blinds pull cords in our bedroom. She wrapped her neck 3 times then jumped," the woman wrote in the post, adding that she managed to save her daughter in the nick of time.

"Thank God I was there when it happened. I just can't imagine, what if I wasn't there on time? What if I was buying something outside?" the woman wrote.

When the woman asked her daughter to describe the video, the girl said "a kid tied a rope around his neck then he became a ghost."

"My innocent four-year-old baby girl almost lost her life because of some stupid Tiktok video," the woman said, adding that the girl suffered a minor scratch and scar around her neck.

See posts, photos and more on Facebook.

The post has since gone viral on Facebook. While some people criticized the mother for allowing her young daughter to watch such TikTok videos, others said parents should monitor what their children watch online.

The incident comes days after an 8-year-old Michigan girl nearly lost her life after trying to imitate a viral TikTok magic trick which required her to put a dice in her mouth and roll it around in order to make it "disappear." Instead of a dice, the girl used a quarter to perform the trick. She accidentally swallowed the coin, leaving her gasping for breath.

She was rushed to a nearby hospital where an X-ray revealed that the coin was stuck sideways in her throat.

She underwent an emergency procedure and the coin was removed from the throat.

A TikTok logo is pictured. GETTY IMAGES NORTH AMERICA / Drew Angerer