A cargo plane made an emergency landing Thursday evening at Miami International Airport (MIA) when huge sparks began flying out of the aircraft.

Officials with the Federal Aviation Administration (FAA) said Friday they will investigate what happened during the Atlas Air flight that had people on the ground watching in shock, NBC News reported.

The aircraft had just taken off from MIA when the incident occurred.

Video footage shows the plane crossing the dark sky as what appeared to be flames and sparks spew out behind it, per video footage from the Today Show.

“We’ll go ahead and land; we have five souls on board,” a pilot says in the audio recording. The outlet said no one was hurt during the incident.

Atlas Air said the plane suffered an engine malfunction during the flight and it would investigate the matter thoroughly to determine exactly what happened. The Today Show noted the craft was a Boeing 747.

Additional footage shows the plane sitting at the airport after the harrowing ordeal:

FAA officials said the plane was on its way to Luis Muñoz Marin International Airport in Puerto Rico and took off at 10:22 p.m. However, it was forced to land minutes later at 10:30 p.m.

It happened not long after a terrifying incident on an Alaska Airlines plane traveling from Portland, Oregon, to Ontario, California, when a huge piece of the craft blew off during flight, Breitbart News reported January 6.

Passengers were frightened when the piece detached and left a hole next to passenger seats. The force of it sucked out travelers’ belongings and the pilots were forced to make an emergency landing.

@strawberr.vy

Girls’ trip turned into emergency landing trip… #alaska #alaskaair

♬ original sound – vy 🍓

“Fortunately, the seats closest to the hole were empty, and no one was seriously injured,” the report said. “The Boeing 737 Max 9 was practically brand-new, having just been built and approved to fly in late October, according to the Federal Aviation Administration (FAA) registry.”

The incident is being investigated.