United Airlines passengers stranded at least 16 hours after plane diversion to Canada United Flight 179 was traveling from Newark to Hong Kong.

Passengers on a United Airlines flight were stranded for more than 16 hours, and many had to sleep on the plane, after the jet made an emergency landing to aid a sick passenger.

Flight 179 was traveling from Newark to Hong Kong on Saturday when it was diverted in Canada due to a medical emergency, the airline said.

Medical personnel met the aircraft at Goose Bay Airport in Newfoundland, Canada, and transported the passenger to a local hospital, but a mechanical issue kept the plane from taking off again.

The travel nightmare got even worse when passengers realized they wouldn't be able to leave the plane while crew members worked to fix the issue.

"The airport did not have customs officers overnight so we were not able to let customers depart the aircraft. An alternative aircraft is being flown in to transport customers back to Newark," the airline said in a statement. "We apologize to our customers and our crew is doing everything possible to assist them during the delay."

The passengers had to spend the night in the plane, with some passengers saying they were stuck for nearly 18 hours. United did not confirm those reports.

"I think there was miscommunication between ground crew at Goose Bay and the people running flights ops in Chicago," Liam Keefe, a passenger on the plane, told ABC News. "At the end of the day, the guy probably would have died if we didn't divert. That was the reason we were stuck for a long time."

Chris Liew, who was traveling to Hong Kong for a meeting on Monday, said the the passengers were stuck for at least 16 hours.

"I think by the third hour they knew something was wrong mechanically," he said. "They had time to send another flight. But they didn't until close to 12 to 13 hours later."

"The breaking point," added Eitan Magid, another passenger, "was when you thought that airplane was coming to get us. They did come, but 12 hours late, and we get on that flight and we ask for food, and they said there was no food, only snacks like pretzels. I said, after 12 hours you brought pretzels and we've been sitting first class and eating food. And that's more and more and more adding to the whole incident. It felt like they didn't care."

United said it sent a rescue aircraft to transport customers back to Newark on Sunday evening. The airline said the passengers departed Newark International Airport on the original flight at 3:03 p.m EST Saturday and arrived back in Newark at 5:44 p.m. Sunday.

ABC News' Marissa Parra contributed to this report.