NEWARK — A United Airlines flight bound for Los Angeles returned to Newark Liberty International Airport after takeoff because of what the airline described as a "mechanical issue" — but passengers said was an engine on fire.

United flight No. 1871, carrying 168 passengers, left Newark around 9:10 p.m. but made a safe return just over an hour later, according to the website FlightAware.com.

"The flight landed safely and passengers deplaned normally. We changed aircraft to get our customers to their destination as soon as possible," United spokeswoman Cheryl Gibbs told New Jersey 101.5 in a statement.

Video recorded by a passenger and posted to Twitter by @gabby_guzy showed flames coming out of the engine under the right wing of the plane. The Twitter user said the right wing of the plane started sparking and an engine failed.

Video tweeted by another passenger out the window in the air showed flames coming from the wing.

Tom Podec Aviation in a tweet showed FlightRadar24.com's image of the plane looping over North Jersey before returning to Newark.'

Passenger Nicole Adamo tweeted that it was "the most terrifying experience of my life" watching the wing and engine. "They're making announcements but I can't hear anything because people are screaming."

"I’ve never seen/felt an engine light on fire and burst like this. It was honestly scary," Adamo wrote.

She later tweeted praise for the pilot and said United gave passengers snacks, water and $500 flight vouchers.

"They're trying to make right & are consoling freaked out passengers. Stuff happens. We’re safe. It’s cool," Adamo tweeted.

Contact reporter Dan Alexander at Dan.Alexander@townsquaremedia.com or via Twitter @DanAlexanderNJ

Enter your number to get the NJ 101.5 app

More from New Jersey 101.5