The flight ended up landing at the airport it originally departed from: Newark Liberty International Airport in Newark, New Jersey.
Videos posted by passengers online show what appear to be flames shooting from one of the plane’s engines.
"United 1871 from Newark, New Jersey to Los Angeles returned to Newark due to a mechanical issue. The flight landed safely and passengers deplaned normally. We are working on changing aircraft to get our customers to their destination as soon as possible,” United spokesperson Kimberly Gibbs is quoted as saying in a statement to media outlets.
According to one passenger who was on the flight, the engine failed just moments after the plane took off from Newark Liberty International Airport.
"Most terrifying experience of my life. ... Flight takes off, Right wing of the plane (where I’m sitting in the aisle seat) sparking & now one engine failed," passenger Nicole Adamo tweeted. "They're making announcements but I can't hear anything because people are screaming."
Another unidentified passenger who was returning to California from Tel Aviv described the incident to ABC.
"It was a very normal climb out, and we've been on flights hundreds of times, but right as [the pilot] was starting to seem like pull power back a little bit, there were four or five of the loudest bangs I had ever heard," the passenger said. "We just came from the Middle East, so you're thinking, oh man, is this an engine problem, is it a missile? Everything flashes through your mind."
Fire trucks met the plane as soon as it safely landed. The original flight flew out of Newark at 7 p.m. EST, but passengers had to wait until around 2:00 a.m. Thursday to board another flight to Los Angeles.