An Air Canada flight was forced to made an emergency landing in Madrid on Monday after the plane's landing gear fell into one of its engines.

Flight AC837 was returning from Madrid to Toronto with 128 passengers on board when it experienced an engine issue shortly after leaving the ground.

The pilot radioed Madrid Barajas and informed air traffic control that the plane would need to return immediately.

EMERGENCY LANDING: An Air Canada plane made an emergency landing in Madrid after an engine was damaged on takeoff, with a fighter jet dispatched and pilots circling for hours to burn off fuel before safely landing. @davidmuir reports. https://t.co/SdrdYm0nFA pic.twitter.com/JrEpd5grOe — World News Tonight (@ABCWorldNews) February 4, 2020

One of the aircraft’s 10 tires ruptured during takeoff, making it impossible for the plane to continue to Toronto.

The aircraft circled the airspace above Madrid for over two-and-a-half hours in order to lessen its fuel load.

✈️ EARLIER: Passengers disembarked an Air Canada flight in Madrid's international airport after an emergency landing.



The Boeing 767 plane damaged an engine and ruptured a tire during takeoff pic.twitter.com/jtDD4gIKBT — QuickTake by Bloomberg (@QuickTake) February 4, 2020

Spain's Defense Military dispatched an F18 fighter jet to evaluate the damage to the Air Canada Boeing 767-300.

The fighter jet did a visual inspection of the landing gear to ensure that it was safe for the plane to land.

Spain's Defense Ministry dispatched an F18 fighter jet to evaluate a damaged Air Canada plane before the flight with 128 passengers on board made a safe emergency landing in Madrid. https://t.co/bAAicxb694 pic.twitter.com/F7gjjrNKhK — ABC News (@ABC) February 3, 2020

The Air Canada flight eventually landed in Madrid's Barajas airport at 7:15 p.m. local time.

After a nail-biting landing, passengers burst into loud applause, and a few people even whistled.

Air Canada flight #AC837, Madrid to Toronto, has landed safely at Madrid airport, having returned due to an engine issue.@AirCanada pic.twitter.com/DesSVxPpEp — ALEJANDRO HIDALGO (@AlexCopito) February 3, 2020

Emergency vehicles with flashing lights arrived to greet the plane.

Passengers were ushered through the airport, accompanied by the Spanish military and police force. They were then transferred to a large coach bus and transported to safety.

Pictures of the damaged tire have emerged following the incident.

The rubber has been badly burned, leaving one side of the steel frame completely exposed; it's hard to believe that the Air Canada pilot managed to land the plane so smoothly under the circumstances.

An Air Canada Boeing 767-300, with 128 passengers on board, has made an emergency landing in Madrid, after part of the landing gear reportedly fell into an engine.The plane returned to Madrid and made an emergency landing at about 07.15 local time. #aviation pic.twitter.com/vYhIaiAuBq — Aviation For Aviators (@Aviaforaviators) February 4, 2020

People across the world have reached out to congratulate Air Canada on their excellent job.

This person pointed out that the crew deserves some time at the Ritz.

I hope you give those crew members a nice 2 day staycation at a 5 star hotel. They made us proud. — Roger Victor (@CaptRogerVictor) February 3, 2020

And this person noted that, sometimes, teamwork really does make the dream work.

Congratulations on the great crew and it would be nice to thank air traffic controllers, firefighters, Spanish army, police and other authorities that have supported the plane ...👏🏻👏🏻👏🏻 pic.twitter.com/Y0aTu7rzj9 — daniel (@danielmargarida) February 3, 2020

Canadians especially were feeling pretty patriotic.

Well done Air Canada Pilots and Crew. Keeping everyone safe. 🇨🇦 — ANN DUFFY (@ann_duffy) February 3, 2020

And this person really summed up how everyone was feeling after the plane touched down.

pic.twitter.com/npGiQI7OJ6 — 16 year old aviation scrub (@Aidan_78RBX) February 3, 2020

Hopefully the Air Canada flight crew are taking some well-deserved vacation days this week.