A video of a boy dangling by his head from the fourth floor of a residential building in China has gone viral on social media. According to the 42-second clip, the four-year-old was crawling out the window when he slipped and got his head stuck in the metal security railing. ALSO READ | RPF officers rescue man after he slips while trying to board moving train The little boy's grandfather, who was taking a nap, was woken up by his cries and immediately called the fire department for help, the CNN reported. Firefighters soon reached the location and began the rescue. With the help of a security rope, the rescuers tied it around the boy's chest to prevent him from falling. They then used a hydraulic spreader to widen the railing bars to safely remove the child. Watch the video here: