Onlookers captured the dramatic moment a little girl fell into a panda enclosure in China and had to be rescued as the bears drew near.

Video of the incident has been widely shared on Chinese social media, after the unnamed eight-year-old was accidentally knocked off the enclosure wall at the Chengdu Research Base of Giant Panda Breeding in Sichuan province.

The girl had climbed up onto the wall to get a better view before she fell in, according to the state-owned newspaper China Daily.

In less than a minute, curious pandas wandered over to the side of the enclosure where the girl fell in, pausing a short distance away. In the video, increasingly panicked shouts can be heard from other park visitors as the bears approach.

A group of park staff can be seen trying to assist the girl, at first by lowering a bamboo pole that is normally used for cleaning. She reaches for it as one panda moves within just a few metres of her, but cannot lift herself up.

In desperation, a man lunges down from the top of the 2m-high wall, losing his hat in the process. As others hold onto his legs, he reaches for the girl’s hand and, in stages, lifts her to safety.

There were conflicting reports in Chinese state media over whether the rescuer was a security guard or a guide at the centre. China Daily identified him as Liu Guihua, a guide, and he has been widely praised for his actions since the video went viral online.

The girl was reunited with her parents and taken to the panda centre’s clinic for a check-up. Employees later decided to refer her to a local hospital for further examination.

The incident has prompted the Chengdu centre to issue a warning that pandas are not as friendly and docile as they might appear.

It urged visitors to keep their distance and said that once the animals reach the age of two, even their keepers have to treat them as potentially dangerous animals.

In 2008, a keeper was mauled on the leg by a panda at the Ocean Park centre in Hong Kong. The animal whose name, An An, means "peace" in Mandarin, lashed out as the keeper distributed food in the bears’ enclosure.