A federal inspection concluded the barrier at a gorilla enclosure at an Ohio zoo was not in compliance with standards when a three-year-old boy slipped underneath and fell into the animal exhibit, sparking a frantic rescue mission that ended in the death of a 17-year-old endangered gorilla.

But just one month before the May 28 incident, the barrier system at the Cincinnati Zoo Gorilla World exhibit was found compliant during an inspection by the United States Department of Agriculture, the zoo said in a statement to NBC News on Thursday.

"In its 38-year history, the barrier system at Gorilla World has always been found compliant during USDA inspections, including one conducted in April of 2016," the statement said.

Harambe, a 17-year-old male gorilla, was shot dead Saturday after a child fell into his enclosure. Cincinnati Zoo

An inspection report posted on the USDA’s website last week, and first reported on by The Associated Press on Thursday, found that the barrier was ineffective and not in compliance with federal standards the day the child was able to slip underneath the barrier, push through brush and trees and fall nearly 15 feet into the enclosure housing several gorillas.

"It was in compliance until May 28th and then it was found to be not in compliance as it did not restrict public access from the nonhuman primate," USDA Spokeswoman Tanya Espinosa told NBC News.

The Cincinnati Zoo has sinceredesigned the fence at the gorilla enclosure, making it six inches taller than before and covered in nylon mesh.

Related: Zoo Security Under Scrutiny After Boy Falls Into Gorilla Enclosure

After the boy fell into the enclosure, two female gorillas were safely recalled by a zoo keeper into a gorilla holding area, but a 17-year-old male named Harambe did not respond to the keeper and instead approached the boy, according to the USDA report.

Harambe then grabbed the child, dragging the boy in shallow waters in a moat within the enclosure.

A Dangerous Animal Response Team (DART) member at the scene determined the boy’s life "to be in imminent, life threatening danger" and fatally shot Harambe, according to the report.

The inspection report also found that zoo keeper immediately initiated the facility’s emergency response and security responded promptly to the incident. "All standard operating procedures relating to the Dangerous Animal Response Team were properly followed," the report said.

The boy was safely recovered and sustained no major injuries during the incident, the USDA said.

Related: Some Experts Say Zoo Had Little Choice in Decision to Kill Harambe

Espinoza said that while there wasn’t a specific part of the barrier that wasn’t in compliance, the barrier was ineffective in keeping the boy out and thus became non-compliant as a result of the May incident.

Cincinnati Zookeepers have revealed a new enclosure for the Gorilla World exhibit before reopening the section on June 7. Cincinnati Zoo

Three surveillance cameras were also added to the enclosure, the USDA said. The exhibit reopened on June 7.

The zoo cited a letter to its board of directors from Dr. Elizabeth Goldentyer, a regional director of the USDA’s Animal Care program under its Animal and Plant Health Inspection Service (APHIS) division in its statement following the USDA report.

"Animal Care recognizes and appreciates the swift and comprehensive actions taken in response to this incident, both the immediate response during the incident and the overall review of barrier systems throughout the facility," Goldentyer said in the letter, according to the zoo. "We also acknowledge that the barrier system at Gorilla World was considered to be in compliance with Section 3.78(e) of the Animal Welfare Act Regulations during inspections prior to the incident in question and had been performing admirably for many years."

Cincinnati Zoo Director Thane Maynard said in a statement that the zoo remained "committed to visitor and animal safety" and would continue to work "to ensure that our exhibits meet or exceed standards."

Video of Harambe’s final moments and his encounter with the child sparked outrage from animal activists worldwide who argued the gorilla did not seem like it was going to hurt the boy and did not need to be killed. Harambe was a Western lowland silverback gorilla, which the World Wildlife Fund considers critically endangered.

The deceased gorilla has since also become a popular meme online, sometimes used to convey racist undertones.

There is still currently an open investigation into the Cincinnati Zoo, Espinosa said.

An investigation can lead to an official warning letter, which would not contain a monetary penalty but let the facility know they would have to come into compliance or face further action and would be monitored more closely. An investigation could also be send to an administrative law judge who could then determine the facility should face a fine or license suspension or revocation, she said.

A statement from the family of the boy who fell into the enclosure said the "findings do not change anything for us."

"We are thankful to the Lord that our child is safe and well. It was a tragic accident," the family said in the statement Thursday afternoon. "We very much appreciate the quick actions by the Cincinnati Zoo staff, and mourn with them the loss of Harambe."