It’s last call for boozing beachgoers at two popular party spots on Fire Island.

Every weekend, hundreds of people looking to soak up the sun with a Solo cup in hand flock to two federally owned beaches, where drinking is legal, in the Town of Islip.

But the National Park Service is putting an end to the party by banning alcohol on all federal lands between the communities of Atlantique and Corneille Estates in the Fire Island town starting Aug. 1.

“It’s about protecting the resource and protecting its recreational value, not only for park visitors, but the community as well,” Chief Park Ranger Ronald Michael told The Post.

Drinking is already banned on Islip-run beaches, so partiers head to adjacent federal shores.

“These people are not picking up after themselves,” said Islip Town Councilman John Cochrane. “They’re going to the bathroom on people’s lawns. It’s just mayhem.”

Many of them are New York City residents, he added.

The alcohol ban is restricted to two small federal tracts of land that account for roughly a quarter-mile of shoreline. They lack garbage bins and bathrooms for the 500 to 1,000 visitors that drop by every weekend.

“They do an awful lot of partying,” Islip real-estate broker Jamie Winkler told The Post. “One kid almost drowned, and we had to save him. They go through the dunes without any concern and urinate.”

She said the new rule is “very good news” for residents fed up with rambunctious revelers dropping garbage on their lawns.

The litter problem became so bad that it took park service staff members three to four hours to clean up the beaches.

“It’s progressively gotten worse,” Councilman Cochrane said.

Intoxicated sunbathers were also destroying dunes as they searched for a more private stretch of sand to relieve themselves on.

Ranger Michael hopes the new rule will make the two beaches less attractive to rowdy Fire Island visitors.

Drinking has not been banned at the other beaches that make up the federally owned Fire Island National Seashore, so coastal carousers are welcome to take their bottles of booze elsewhere.

“These are two areas where we’ve seen a need to take additional steps to mitigate visitor impact and protect and sustain the resource,” Michael said. “We would hope that they find another venue to enjoy themselves in.”

Annoyed residents in East Hampton have also proposed a partial ban on alcohol at Indian Wells Beach, which is not federally run. East Hampton is the only municipality on the east end of Long Island to allow booze on the beach, according to The Associated Press.