By Snejana Farberov

The engine of a plane bound for Los Angeles caught fire just minutes after takeoff from Mexico — forcing the pilot to turn around and make an emergency landing.

Viva Aerobus Flight VB518, which has a capacity of 186 passengers, had departed from Guadalajara, Mexico, just before 10 p.m. Tuesday.

About 10 minutes into what was supposed to be a three-hour flight, passengers noticed sparks and flames shooting out of the jet’s right engine, according to ABC 7.

Some travelers reported hearing the sound of an explosion.

The in-flight emergency caused a panic aboard the aircraft, with terrified passengers crying, screaming and praying, the outlet reported.

The crew was alerted while the jet was at 13,000 feet, and the flight returned to Guadalajara’s airport, where it made an emergency landing 45 minutes after takeoff, reported the site Simply Flying.

No injuries were reported as a result of the incident.

Viva Aerobus said in a statement that the sparks in the engine were caused by a “friction of metals.”

According to the airline, passengers on the diverted flight were put up in a hotel for the night and were able to resume their journey the following morning.

“We profoundly lament the inconveniences that this instance could have caused,” the ultra-low-budget air carrier stated.

The cause of the engine fire was being investigated.