The Cincinnati Zoo's barrier separating Harambe the gorilla from the public was not in compliance with safety standards on the day a three-year-old boy slipped into the exhibit, leading to the fatal shooting of the gorilla, a federal inspection has found.

A US Department of Agriculture inspection report, obtained by the Associated Press, also stated the zoo's dangerous-animal response team properly followed procedures after visitors called 911 on May 28 to report a child in the gorilla enclosure.

A team member concluded the child was in "life-threatening danger".

The death of the 17-year-old male western lowland gorilla led to mourning around the globe and a storm of criticism and unending social media attention.

The zoo quickly made the barrier taller and added nylon mesh and surveillance cameras. It said there had been no previous problems in the Gorilla World exhibit's 38-year history and its barriers were always found compliant in earlier federal inspections, including in April.

The federal investigation is continuing and could lead to fines or other disciplinary action.

The department's animal welfare arm confirmed the zoo's barrier system had been considered to be in compliance during earlier inspections.

Department spokeswoman Tanya Espinosa said the barriers must restrict public contact from the gorillas.

"It became apparent on May 28 that the barrier was no longer effective," Ms Espinosa said via email.

"The Cincinnati Zoo took swift and comprehensive corrective action in response."

Zoo director Thane Maynard said the zoo will continue to work with authorities to ensure its exhibits meet or exceed standards.

"We remain committed to visitor and animal safety," Mr Maynard said.

Shooting causes uproar

The shooting of Harambe caused an international uproar, with many believing the gorilla's life should have been spared.

Some critics had called for criminal charges against the mother, who was with the boy at the zoo, for reckless endangerment. The boy suffered a concussion and some scrapes but escaped serious injury.

No criminal charges were filed against the mother, who according to witnesses, never placed her son in danger and only turned away for a few seconds to deal with another child.

Sorry, this video has expired US zoo kills gorilla after boy falls into enclosure

The boy was at the zoo with his mother, three sisters aged seven, four and one, and family friends when he climbed over a metre-high barrier and fell 4.5 metres into a moat, according to the Hamilton County prosecutor's office and witnesses.

The gorilla dragged the child through the enclosure. Fearing for the boy's safety, the zoo's dangerous animal response team shot and killed the gorilla, who was with the boy for 10 minutes.

The child was between the gorilla's legs when the animal was killed by a single rifle shot to the head, the prosecutor's office said.

The incident eventually shifted from a source of public anger to a running joke, with hashtags such as #JusticeForHarambe and #HarambeForPresident appearing on social media, and Harambe becoming a popular meme.

AP/Reuters