A Singapore Airlines plane made an emergency landing last week because the sheep on board set off the smoke detector with their gas, USA Today reported.

The Boeing 747-400 freighter was en route to Kuala Lumpur with a crew of four and over 2,000 sheep in the cargo bay, according to The Aviation HeraldThe aircarft was performing a routine flight when the crew got a smoke indication in the cargo bay area where the sheep were held, One News Page reported.

The cause of the alarm was neither smoke nor fire, but gas, The Aviation Herald noted. The plane was diverted to Bali Denpasar for a safe landing 45 minutes later.

After inspection the emergency services declared that the sheeps' manure and gasses caused the smoke alarms to go off in the cargo bay.

Stress can cause sheep to become bloated with gas, according to Sheep Magazine. Mike Neary, an Extension Sheep Specialist at Perdue University, wrote a study on the effects of stress on sheep and how to handle them.

"Treat bloated sheep with care. The build-up of pressure in the rumen can actually cause a partial collapse of the lungs. Furthermore, blood from the body is forced out of the body cavity to the extremities and can cause a form of acidosis." Neary stated. Acidosis is increased acidity in the blood and body tissue.

"Thus, stressing these animals complicates the situation," Neary added.

The cargo plane was grounded for 2.5 hours in Denpasar allowing the sheep time to calm down before departing for Kuala Lumpur, Malaysia.

Check out the video below.