NEW YORK — James O'Leary weighed barely over a pound when he was born by surprise, a world away from his home in Australia.

His mother was nearly six months pregnant when she went into labor on a vacation that became an anxious four-month sojourn, with James in intensive care at Bellevue Hospital, his survival at stake.

Nearly six years later, the healthy, typical kindergartener bounded into a balloon-lined room at Bellevue with his father Wednesday for a homecoming of sorts with the doctors, nurses and other staffers who became a surrogate family when the O'Learys were far from their own.

"It's great," he said, then spotted a screen where a photo slideshow of his first few months was playing: "Look."

Now raising four children in Sydney, Brett and Jennifer O'Leary didn't know she was pregnant — with twins — until after booking an August 2009 jaunt to New York. Jennifer's doctor OK'd the trip, planned for about the 22nd and 23rd weeks of her pregnancy, her husband said. Airlines typically allow women carrying multiple babies to fly through the 32nd week of pregnancy, the World Health Organization says; some cruise lines bar pregnant women starting as soon as the 24th week.

Jennifer O'Leary's contractions started 10 days into the trip. Doctors gave her medications to slow the labor and help the tiny twins develop and told the O'Learys to expect the babies to stay in the hospital through their original due date — in December.

James and Thomas were born at 24 weeks and a day, their father said. It would be about 30 days before their parents could take James out of an incubator and snuggle him against their skin — a practice known, to the couple's delight, as kangaroo care.

By then, Thomas had died of infections at 18 days old, his father said. It wasn't clear whether James ever would get to go home.

"For the first 50 or 60 days, you were really walking on eggshells," Brett O'Leary said. "It's just a feeling of helplessness. ... You're sort of in the hands of the gods."

At the start, James couldn't breathe on his own or feed, but he "was a fighter," neonatologist Dr. Pradeep Mally recalled.

While spending their days at the hospital, the new parents scrambled to find an apartment nearby. The Australian consulate helped them arrange to stay legally in the U.S. Brett O'Leary's then-boss at his engineering job continued his salary, sent him a cell phone and gave him a loan (Jennifer O'Leary, a lawyer, gave up the part-time job she then had). Travel insurers covered medical bills and many living expenses. Bellevue staffers tried to make the Australians feel at home, even inviting them to holiday parties: "We really felt for them," physician's assistant Donna Hennessy said.

After four months, James was about 4.5 pounds and finally ready to go home, flying in an incubator that took up 13 seats in a commercial plane.

Crossing the international date line along the way, the family lost a day — Dec. 12, James' due date, his father said.

"It's kind of like a day that he was never due to have."

Reach Jennifer Peltz on Twitter @ jennpeltz.