The engine of a United Airlines plane traveling from San Francisco to Hawaii fell apart mid-flight on Tuesday.

Photos and videos shared on Twitter showed the terrifying incident as it unfolded.

Flight UA1175 ultimately landed safely, though one passenger called it the "scariest flight of my life."

Passengers on a United Airlines flight from San Francisco to Honolulu were shaken on Tuesday when one of the plane's engines began to fall apart mid-flight.

Photos and videos posted on social media show the parts peeling off the Boeing 777-222 aircraft's engine in midair, with its inner workings increasingly exposed.

One passenger said in a tweet that it was the "scariest flight of my life."

Flight UA1175, which sent a distress alert on its approach to Hawaii, ultimately landed safely at 12:38 p.m. local time.

In a statement to Business Insider, the airline said:

"United flight 1175 traveling to Honolulu from San Francisco landed safely after the pilots called for an emergency landing because of a loss of the engine cowling (the covering of the engine). Our pilots followed all necessary protocols to safely land the aircraft. The aircraft taxied to the gate and passengers deplaned normally."

It is not immediately clear what caused the problem, and United was unable to confirm whether the engine beyond the cowling was damaged.

The airline told Business Insider that the aircraft involved had the tail number N773UA. It's a Boeing 777-222 that was delivered to the airline in 1994 and is the fourth Boeing 777 ever produced.

According to AirFleets.net, the plane is powered by a pair of Pratt & Whitney PW4000 turbofans. Pratt & Whitney was not immediately available for comment.

The Boeing 777 is designed to fly on a single engine.

A video posted on Twitter by Erik Haddad, a Google engineer aboard the flight, shows the engine's casing flaking and shaking.

"I don't see anything about this in the manual," he joked in another tweet.

Maria Falaschi, a marketing consultant aboard the flight, also shared photos.

It's not the first time in recent memory an aircraft engine has broken mid-flight.

In October, an Air France Airbus A380 suffered an uncontained engine failure that caused the front of one of its four engines to come off while on its way from Paris to Los Angeles. No injuries were reported, and the plane was able to divert to Goose Bay in Canada.

In 2010, a Qantas Airbus A380 had a near-disaster when huge chunks of the rear of one of its engine casings blew off four minutes after takeoff because of a faulty oil pipe. The pilot managed to shut down the engine and safely land the aircraft.

Additional reporting by Paul Colgan.