Walt Whitman visited Montauk in the middle of the 19th century, and was later moved — as was Whitman’s wont — to write some poetry about the occasion: “I stand on some mighty eagle’s beak, eastward the sea absorbing. . . . The wild unrest, the snowy coloring caps . . . seeking the shores forever.”

Bravo visited Montauk some 140 years later, and was moved — as was Bravo’s wont — to create a reality series there. “Summer House” launches Monday, Jan. 16, at 10 p.m. and focuses on nine friends sharing a home over the summer and, as the network says, “letting loose in a big way.”

“Everyone’s heard of the Hamptons,” declaims cast member Kyle Cooke, on the series trailer. “My group of friends? We go to Montauk. The Hamptons are like your mom’s friend who wears pearls. Montauk’s like your mom’s friend’s daughter who’s a little promiscuous.”

One beat . . . two beats:

“And by promiscuous, I mean a lot.”

Then cue to some drunken scenes, and the obligatory hot tub one where someone drunkenly wonders who just passed gas.

advertisement | advertise on newsday

A lot has happened to “The End” since Whitman’s rapturous salute, including indignities, blessings and the occasional insult added to the occasional injury. This newcomer appeared poised to be among the latter.

Then something unusual happened. When the production teams from True Entertainment arrived in Montauk in early summer, they found a posse lying in wait. Permits to film on public property were rejected, and a number of private businesses barred the crews. To hear the critics — and there are many here — “Summer House” was literally run out of town before a frame was even shot.

The show ended up renting a house on Napeague Harbor, which is still within East Hampton Town limits but not within Montauk borders. At least the house had a nice view across the water of Hither Hills State Park in Montauk proper.

“Summer House” is Bravo’s third attempt to establish a reality series on Long Island, joining “Princesses: Long Island” and “Secrets and Wives,” which were canceled 2014 and ’15, respectively, after just one season each. “Princesses” was hugely controversial, “Wives” mostly ignored, but as this newcomer arrives, it confronts a whole other question: Is this self-avowed Montauk-based series even based in Montauk? The answer matters not just to a producer looking to save face — or what’s left of it — but also a ferociously protective community.

Montauk or not Montauk? Well?

The Montauk Chamber of Commerce sought to get Bravo to remove the Montauk references, arguing reasonably enough that the show was filmed elsewhere, and that “Summer House” will simply revive a reputation that Montaukers had assumed was dead — or hoped was.

No luck. The references stay.

In a phone interview in early December, East Hampton Town Supervisor Larry Cantwell said the town had “denied Bravo’s request to film on public property because extensive commercial filming involved a crew in public places in July and August was going to be disruptive, so we declined based on the health and welfare of the community.” He added, “With respect to the content and whether I personally like it or not, based on what I know, the message is contrary to the message that we believe is true about Montauk. It’s a wonderful community and fishing village, but the party scene has been a serious issue.”

A cursory look at the pilot appears to support both the Montauk-based and not-Montauk-based claims.

The house is a well-appointed and conventional Hamptons “cottage” that could be anywhere. The pilot also includes some B-roll stock footage of surfers and beach scenes but doesn’t bother to include shots of iconic Montauk landmarks that would at least support the “we’re out here getting drunk in Montauk!” claim — places like Gurney’s, the Lighthouse, Deep Hollow Ranch or even the Sloppy Tuna, itself an icon of sorts for Montauk’s once lively party scene.

advertisement | advertise on newsday

Bravo declined request for comment, and instead referred to a statement released by True Entertainment boss Steven Weinstock, when the fuss began: “The communities and businesses that granted us access were great partners, and the Montauk and Hamptons residents who participated in the show also gave us terrific feedback. Production, cast, and crew all had very positive and respectful interactions with the community.”

Which establishments? In the premiere, housemates Karen and Carl do stop at Buddhaberry Frozen Yogurt on South Euclid Aveune in the village. (No law against that, and the yogurt did look good.)In a phone interview, Buddhaberry founder and owner Nancy Passaretti said, “We film many shows at my stores [there’s another in Sag Harbor], including the ‘Kardashians Take the Hamptons’ and ‘Housewives.’ I have no problem with it. Any exposure from a business perspective is a good thing.”

She added, “I’m really surprised at business owners that said no — who wouldn’t want that kind of exposure? But I think what’s happening now is there’s so much political stuff going on out there. . . . I’m a frozen-yogurt store. We’re not dealing with alcohol [and] I’m sure that’s what this has to do with. There’s been so much going on the last two years — that whole thing with the party and bars.”

As TV viewers know well, places are as important to an unscripted series as the cast. What if “Hillbilly Handfishin’ ” was set in Temple, New Hampshire, instead of Temple, Oklahoma? What if “Deadliest Catch” was filmed on the Atchafalaya Swamp and “Swamp People” was filmed on the Bering Sea, instead of the other way around?

Place adds color, context, soul, eye candy and drama. When the cast members get boring, at least you can turn the camera around to check out the gators of the Atchafalaya Swamp.

advertisement | advertise on newsday

Montauk is not the Atchafalaya Swamp. Montauk is unlike anyplace else. Ask the first Montauk resident you meet about Montauk. Or better yet, don’t ask. All you’d have to have done some years ago was glance at the side of a pickup truck owned by a local named Bo Bo where he had famously spray-painted his message to interlopers: “Tourons go home.” That was short for “tourists and morons.”

Montauk has battled the hordes from the west for decades. In recent years, as the Bravo “Summer House” promo indicated, wild and nightly summer bacchanals were a commonplace occurrence in village streets. Tom Bogdan, a resident of nearly 50 years, took action, forming Montauk United, a grass-roots initiative with 1,400 members that successfully forced the town of East Hampton to crack down on the partying.

The only bacchanal you’ll see Jan. 16 is in that house on Napeague Harbor.

In a recent interview, Bogdan — who ran a chain of furniture stores and is now retired— said, “What happened years ago was the result of a town board that believed what was good for Montauk was good for business.” A number of restaurants and clubs were opened, the partygoers arrived, and the cops were overwhelmed.

“This was the wild West, and you could come out here and do anything you wanted,” he said. “If you drove down the street at midnight, it was loaded with revelers, with open cans of beer. There were horror stories everywhere and the police were very understaffed and not able to effectively react to this. The [former] administration would look the other way or cut corners. There were all sorts of code violations, [and then] it all came to a head in 2013, right after Memorial Day weekend. It was such an incredible scene that it enraged the entire community.”

A new administration replaced the old, Bogdan says, and the partying ended.

“In all my 40 odd years here, I’ve seen Montauk react to other moments of crisis and it always reacts the same way. We have very close ties here among the people who live here. We like each other. We share the same values.”

The Bravo show? He says, “It’s a joke and everybody laughed about it. ‘They must be kidding — they have the wrong idea.’ I guess they wanted to capitalize on the notoriety of the years before. When [‘Summer House’] is even referred to now, it’s referred to with laughter and contempt.”

Other shows have come here over the years, by the way. Showtime’s “The Affair” probably helped its case by having Joshua Jackson’s character — Cole Lockhart, a Montauk local — say this in an episode: “These are our schools, our churches, our beaches, our docks, our sunrise, our little piece of heaven under God, and I am never going to leave this place . . . and I will fight to my last breath to keep Montauk local.”

Walt Whitman would appreciate that sentiment, too.