A panda at a zoo in southern China attacked a student who snuck into its pen hoping for a cuddle with the endangered bear, state media said on Saturday.

The 20-year-old male student surnamed Liu jumped over the fence at the zoo in the tourist city of Guilin, ignoring warning signs not to, Xinhua news agency said.

"The panda, named Yangyang, was wide awake. Apparently scared by the intruder, he bit at Liu's arms and legs," it quoted an unnamed worker as saying after zoo keepers managed to calm the bear and rescue Liu, the report said.

"Yangyang was so cute and I just wanted to cuddle him," Liu was quoted as saying from his hospital bed. "I didn't expect he would attack."

Scientists believe fewer than 2,000 giant pandas live in the wild in China.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.