A London tourist turned into a modern-day Gilligan when he became marooned on a makeshift dock that snapped free from a New Jersey marina and was carried more than two nautical miles in a wild sea adventure through New York Harbor early Thursday.

Armaan Raj Munglani, 19, awoke at around 2:30 a.m. at the Jersey City apartment he was staying at and decided to go sightseeing and watch the sunrise at Battery Park when on his way he veered off to the Newport Yacht Club and Marina in Jersey City.

A curious Munglani then walked out onto a flimsy makeshift dock tethered to the marina when suddenly a small piece of it broke free with him on it.

“As soon as I got on it, the rope that actually tied it to the dock just came off. So now I am stuck on this piece of wood and I have no idea what I’m going to do,” Munglani told The Post.

Munglani floated helplessly through the strong, choppy currents of the Hudson River on an 8-foot piece of plywood for more than two hours, managing somehow to avoid the large boats passing through the harbor.

“I tried to maneuver myself back but the current was too strong and it’s just taking me out into the Hudson. Now I really know I’m screwed,” he said. “There are big barges, big cruise ships…I start seeing them and I’m just like, I’m dead meat.”

Munglani dropped his wallet in the waters and got his cell phone wet almost immediately, disabling it from making a phone call. He got so desperate that he tried to dry his phone out with a lighter.

‘[T]he current was too strong and it’s just taking me out into the Hudson. Now I really know I’m screwed… and I’m just like, I’m dead meat.’ - Armaan Munglann

The seaborne castaway – who said the plywood beneath him even started to crack – got so frightened that he was about to meet his end with a watery grave that he frantically began jotting down his last words and messages to his family and friends in a small book he had with him.

“It was my last words to my family, my friends, people I know, people that matter to me,” he said. “Fortunately I tore up the paper now. You don’t want anyone reading that stuff while you are still alive.”

He said the messages were loaded with, “things that I’ve been wanting to tell people but I never really had the guts to. This whole ordeal is giving me the power to go tell people what I really need to.”

After about two hours of struggling to stay afloat, Munglani’s cell phone regained function and he quickly called 911. Within 10 minutes the first of two FDNY rescue boats came to his aid at around 5 a.m.

“I was as happy as a kid in a candy store. I was screaming and shouting out. I was so happy I think I had tears in my eyes,” he said.

Captain Louis Guzzo, commander of the FDNY’s Marine Company 6, said that Munglani “was in a bad spot — right in the middle of the Staten Island ferry traffic.”

“This guy was on a makeshift platform and it was really unstable,” Guzzo said. “How he got across the harbor on that platform and survived is pretty miraculous.”

Firefighter Carlton Hilliard spotted what at first appeared to be a floating piece of debris floating near Governor’s Island. But as the boat approached for a closer look, Hilliard could see the man frantically waving his cell phone while crying out for help.

“He came a long distance from Jersey City,” Guzzo said. “The current was going out toward the Verrazano. You had the wind blowing him, choppy waters.”

“He had to maintain balance on this makeshift thing. You wouldn’t put this thing on a lake let alone New York Harbor.”

Marine Unit 6 was joined by Marine Unit 1, who eventually managed to pull up alongside the precarious piece of wood without knocking Munglani into the water.

He was then hoisted onto Marine Unit 1 — where he gave a big hug to the guys on board.

“He was really happy to see us,” Guzzo said. “He’s lucky to be alive.”

“It was pretty amazing when we realized he was out there for that long and survived. It could have been really bad,” Guzzo added. “I don’t know if any of those other boats would have seen him.”