A police officer in Indiana is recovering after she was accidentally shot by a fellow cop when a dog broke out of its cage and charged at them during an investigation last week, officials said.

The incident happened on Tuesday in Lafayette when officers LaFrene Butler and Aaron Wright were conducting an investigation at an apartment complex and a dog broke out of its cage and jumped on Wright, causing him to accidentally discharge his weapon, according to Lafayette Police Chief Patrick Flannelly.

"Our conclusion in this incident was this was not a result of an act of negligence, carelessness or otherwise reckless behavior," he said during a news conference on Friday. "It was accidental."

ALABAMA POLICE OFFICER KILLED, SECOND CRITICALLY INJURED IN SHOOTING OUTSIDE NIGHTCLUB, CHIEF SAYS

Flannelly said a review board investigated the incident and released dramatic body camera footage of what happened in the apartment

Lafayette Police Officer Lane Butler was injured in the shooting last Sunday. (Lafayette Police)

In the video, the officers can be seen searching the apartment when Butler is told to keep an eye on the large caged dog. When Wright enters the apartment and approached the cage, the dog barked and knocked down the cage door.

The officer then fired a shot while turning away, which struck Butler. A body camera from another cop at the scene, Officer Aaron Wright, shows the bullet go through a door separating Wright and Butler.

ILLINOIS STATE TROOPER FATALLY STRUCK WHILE INVESTIGATING VEHICLE CRASH ON INTERSTATE

"From the moment the dog began to force its way out of the cage, the officers were faced with just a few options in fractions of a second," Flannelly said Friday.

He added that Wright never intended to pull the trigger.

"When we asked him, he flat out said he had no intention of shooting the dog," he said.

CLICK HERE TO GET THE FOX NEWS APP

Butler was transported to a hospital and while initially listed in serious conditions is expected to fully recover, according to FOX59.

The dog involved in the incident was not injured, police said, and was placed in the temporary care. The animal has since been returned to its home.

The Associated Press contributed to this report.