United Airlines flight 863 made a safe emergency landing at 12:35 a.m. It was headed to Sydney when it had to turn around and come back to SFO.

Passengers say one of the engines caught fire during takeoff. Some heard two loud sounds and then saw two big sparks. They are all okay.

Passenger Aman Hauja said: "We were about half an hour to 45 minutes into the air and we were informed that there was apparently a fire in one of the engines. The engines were working reasonably well after that announcement, but to be safe and such a long journey, they decided it's better, safer to return back."

Hauja went on to say: "We were I guess pre-warned, so it wasn't too nerve-racking I must say. The pilot and the staff were very reassuring that things are in control and in no danger, working fine."

United Airlines sent this statement to ABC7 News:

"The flight landed safely and we will work to get our customers to Sydney as soon as possible. Our maintenance team is inspecting the aircraft."