The drinks were on Sandy!

A Brooklyn marina pub broke off from its main structure during the hurricane — and floated two miles before landing on a residential street, treating stunned residents there to its well-stocked bar for an after-storm bash.

“We had a big party. We had nothing else to do while we were waiting for everything else to dry, and this was a great opportunity to get our minds off everything,” said Michael Sarrell, 27, one of the Gerritsen Beach residents who took solace in the battered Gateway Marina bar that came to rest just outside their door.

The bar — which residents identified as a chunk of the marina establishment on federal parkland on Flatbush Avenue — had been lifted from its foundation in Mill Basin during Superstorm Sandy and drifted in swollen Deep Creek Bay, past the Belt Parkway, all the way west to the dead-end block at Madoc Avenue and Keen Court in Gerritsen Beach.

“It was moving 30 mph toward my house!” said Patrice Dolan, 52, who recalled screaming, “Oh, my God! What do I do? What do I do?” as the surreal moment played out.

When the bar hut came to a rest, residents discovered its tables and chairs were miraculously intact — as was a wide variety of booze.

By Wednesday, residents had set up an impromptu watering hole, writing “SANDY’S BAR” in red marker across the gray facade.

Once the liquor supply quickly ran out, “B.Y.O.B.” was scribbled below.

Sarrell’s brother Keith, 26, said the whole neighborhood then took to bringing in booze, coolers and even power generators to keep the party going.

“We had Jameson, Skyy Vodka and a bunch of beer,” said resident Nino Coppolino, 29. “We packed 40 people in there. That’s a lot of body heat to stay warm.”

The partying lasted through Friday night but ended Saturday, when cops and sanitation workers arrived and razed the structure for safety reasons.

“I was going to try and put it in my back yard and make it a permanent bar, but they had to knock it down,” Keith Sarrell said.

Last night, with the bar gone and reality setting in, residents along the strip were burning damaged furniture and cardboard in a barrel to keep warm.

It’s unclear when the devastated seaside community will get its power back.

Bill Gallucci, a 50-year-old boat mechanic, said the liquor license on one of the displaced bar’s walls indicated it was part of Gateway Marina.

The structure “had thousands of dollars of floatation devices under it,” he said. “And they had barnacles growing on them.”

Some residents had briefly believed the bar was actually part of a popular beach bar in Breezy Point, Queens, seven miles away called the Sugar Bowl because the structures looked similar.

“It’s a shame they had to tear it down,” Gallucci said of the hut.

“It probably could’ve been transported safely back to the marina.”