Staff at Edinburgh Zoo have raised safety fears after a panda was let back into its enclosure while a keeper was still inside.
A CCTV image of the narrow escape has been leaked to the media to highlight concerns by a group of workers who claim the zoo is in "crisis".
Edinburgh Zoo has said staff reported the near miss last year, which was fully investigated.
It is said no staff grievances have been raised or handled by its board.
Despite their "cuddly" image, adult giant pandas can be as dangerous as black bears and there have been serious attacks on staff and visitors at other zoos around the world in recent years.
Three visitors to Beijing Zoo were mauled between 2006 and 2009 after falling or jumping in to Giant Panda enclosures.
In 2011, a Giant Panda bit a member of staff at San Diego Zoo in California.
Other escapes from Edinburgh Zoo
Over the past five years a red panda, a pelican and a huge bull are just some of the animals to have escaped their enclosures at Edinburgh Zoo.
Others which have fled their cages include a red river hog, an ibis, a Bateleur eagle, a macaw and a Madagascan teal.
The biggest of the escapees was a Heck cattle bull, which got out of its enclosure in 2012 and led to visitors being moved indoors.
The adult male was on the loose for about 40 minutes before it was tranquillised by a team of keepers and vets.
The data, released following a freedom of information request by the City of Edinburgh Council, also shows the week before the bull escaped, a scarlet ibis was recaptured after fleeing the zoo and evading its keepers for six days.
The rare bird left its enclosure through a hole in the netting.
The CCTV picture from Edinburgh Zoo appears to show the enclosure of the male bear, Yang Guang. The bear is just a few steps behind a female keeper who is making her way out of the door.
In a leaked email which was sent to bosses by staff at the zoo it was claimed the institution was in "crisis", morale was at rock bottom, and that safety had been compromised.
It was also suggested that Yang Guang could have escaped into the public area of the zoo as a result of the security failure in 2016.
Edinburgh Zoo admitted there had been a "near miss" with the panda.
The City of Edinburgh Council, which licenses the zoo, confirmed the incident took place and the zoo had "revised" its procedures.
A spokesman for the Royal Zoological Society Scotland said: "RZSS takes welfare of animals and staff extremely seriously and follows strict safety procedures, with any incidents duly reported to City of Edinburgh Council.
"Staff reported a near miss last year which was fully investigated and Edinburgh Council were kept informed throughout the process. No staff or animals were harmed during the incident.
"While we never comment on speculation or accusatory comments from anonymous sources, should any staff grievances be raised they are handled by our well-established Employee Consultative Board.
"We can confirm this has not occurred in this instance."
Edinburgh Zoo is the second most popular paying visitor attraction in Scotland. It attracted 574,000 visitors in 2016 - but that was 10% down on the previous year.
It was hoped the arrival of giant pandas Tian Tian and Yang Guang in December 2011 would bring in extra revenue but the pair have so far failed to produce a cub.
Elisa Allen, director of animal welfare charity Peta said: "Those in zoos - even the so-called 'best zoos' - often go insane from the lack of mental and physical stimulation, making them all the more unpredictable.
"As long as we continue to treat wild animals as living exhibits, it'll only be a matter of time before we're talking about the next victim of a captive-animal attack."
Leaked email in full:
The anonymous staff email stated: "We are…worried about the safety of staff. We have found out that there was a very serious near miss last year when a panda was let back into the enclosure with a keeper still cleaning in there and she could have been seriously injured or even have died.
"We got to hear about the near miss with the panda a while after it happened, just through rumour at first and then the keeper who experienced it went off sick and never came back.
"She heard it behind her just in time to be able to get out of the enclosure. If she hadn't she could have been mauled, seriously injured or even killed.
"We also know that the panda could have escaped into the public area of the zoo. Are we going to wait for a disaster to happen before things change at the zoo?"
"We are seriously worried about our jobs and the future of the zoo.
"Some of the keepers are concerned about the welfare of the animals as sometimes they are so short-staffed and have little time it stops them giving proper care to the animals.
"There has been some near misses, mistakes and animal deaths because of it.
"Visitor numbers are very poor, Zoo Nights and the Ferris wheel were an embarrassing disaster and got a lot of poor web reviews, and the Chinese lantern festival looks like going the same way.
"There is a dreadful atmosphere around the zoo with staff morale the lowest we have ever known it."