An international United Airlines flight from New Jersey to Brazil ended up circling over the Atlantic Ocean for nearly two hours Wednesday 

and making an emergency landing due to a mechanical issue, flight officials said

Flight 149 departed from Newark Liberty International Airport in New Jersey at 11 p.m. EST Wednesday night, 

bound for São Paulo–Guarulhos International Airport with 256 passengers on board, according to the flight's history.

The plane experienced a “mechanical issue shortly after takeoff,” United Airlines said in a statement,

 revealing initial maintenance inspection points to a hydraulic pump issue. 

"It remained in the air to burn fuel and then landed safely," the airline said.

 "Passengers deplaned at the gate and a new aircraft is scheduled to depart this morning.”

A map of the flight's history shows how it flew in repeated circles over the ocean off New Jersey's coast before landing back at Newark around 1 a.m.

The plane, a Boeing 777-200, landed after the crew reported an "emergency", the Federal Aviation Administration said, noting an investigation is underway