It is 2 a.m. on South Beach in Edgartown on an overcast and chilly evening in early June.

A group of about a dozen young people gather around a small fire fueled by driftwood and wooden pallets. A young man with a guitar sings Folsom Prison Blues by Johnny Cash as a bottle of Bacardi rum is passed around the circle. A girl wearing a bandana chats up a tall man with a foreign accent. The two have just met, and after a brief conversation it is revealed that he is from New Zealand, she just graduated from college.

Some people arrive in small groups, others seem to magically appear from far corners or the beach. Some know each other, others are meeting for the first time and exchange introductions and hand shakes. It is not clear who arrived first, or who invited whom, but the gathering soon swells to about 20 people.

Although there is a rather rogue element to it all - a pipe packed with pungent smelling leaves is passed around at one point, and a steady stream of beers are pulled from coolers and backpacks - there is also something quiet and easy about the whole affair. There are no drunken tirades, no aggressive behavior and no littering (the girl with the bandana warns everyone to take their cans with them). Everyone seems focused on having a good time.

It's summertime on a beach at night on Martha's Vineyard, and all is right with the world.

But the intimacy of the gathering is suddenly pierced by the suspicious glare of a flashlight that cuts through the fog and ocean foam. Party-goers quickly put away the pipes and beer without knowing the identify of the stranger with the light. Caps go onto liquor bottles, the guitar falls silent, conversation halts.

Soon the light-bearer comes into view, and the group's suspicions are confirmed - an Edgartown special police officer has arrived to break up the party. The young officer, probably no older then those on the beach, tells everyone to pour out their open containers and put out the fire. He asks everyone if they are of legal drinking age, and does a quick check to make sure everyone is sober.

Since this is a particularly well-behaved and largely sober crowd, the fire is quickly extinguished and the group disbands without incident. The officer tells the revelers that the beach is closed to the public at night, and tells them that fires are prohibited.

But in a moment of candor he confides: "We're not so much worried about people being here [at night], it's more about the fire. If we see one, we have to tell people to put it out."

This true account from several weeks ago aptly sums up the quandary of summer beach parties on the Vineyard. The romantic notion of sitting by a bonfire on the beach at night is an American rite, and is depicted in everything from beer commercials (think the old Löwenbräu spots) to Hollywood movies (think Jaws, before things took a turn for the worse).

But on many beaches across the Island, parties are either prohibited or strictly regulated. Open fires are not allowed on many beaches, while on some they are allowed only by permit. On some public beaches, it is illegal to have open containers of alcohol, while on others having a cocktail is perfectly legal.

In conversations with the Gazette, Island police officials this week said they believe hanging out on a beach with some frosty beers and a warm fire is innocent enough. But they also noted that the laws which limit or prohibit beach parties are to protect people's safety.

"We try to deal with beach parties reasonably and logically," said Edgartown police chief Paul Condlin. "If we come across four people at South Beach sitting on a blanket behaving, then there is a good chance we will let it go. But if it's a group of people partying it up, with a bonfire and music, then we're going to end that right away. We deal with each [party] on a case-by-case basis."

Like all Island towns, there are specific regulations and laws in Edgartown that dictate how police deal with beach parties. South Beach is closed after midnight and a town bylaw bans open containers of alcohol and open fires.

Chief Condlin said the town park department enforces regulations at South Beach during the day, while his officers patrol the area at night. The officers don't specifically look to break up parties, the chief said, but they do try to protect people's safety.

"What we're really worried about is someone drinking too much and then getting behind the wheel of a car or going in the water," the chief said.

Aquinnah police chief Randhi Belain said his officers are sometimes called to break up gatherings on the south side beach and on Philbin Beach. Unlike other towns, Aquinnah does not have an open container bylaw, and the town also does not have a real noise ordinance or noise bylaw.

Complicating matters is the fact that a long stretch of beach along Moshup Trail is privately owned, meaning that police cannot patrol the area and cannot go on the property unless they receive a complaint. Thankfully, Chief Belain said, beach parties are not a frequent problem in town.

"We'll get calls now and then [about beach parties]. We deal with each party individually - if there are a lot of intoxicated people we make sure they are going home with a sober driver," the chief said.

He said he has heard complaints that paint the police as harsh for breaking up parties, but said overall there is no effort to seek out parties and stop them.

"If we get a noise complaint or some other complaint we have no choice but to respond. And if the officers find illegal activity, they will act accordingly," he said.

West Tisbury police chief Beth Toomey said parties or gatherings frequently occur at Lambert's Cove Beach, which are technically prohibited because the beach closes at 9 p.m. Although police often break up these parties, it does not always lead to arrests.

"It all depends on the amount and the age of people there. Sometimes people at these parties have no idea they aren't supposed to be there. They won't even think twice about getting 40 or 50 people together on the beach having no idea it's not allowed," the chief said.

The police department that has fielded the most complaints about breaking up beach parties is Chilmark.

In 2001 police chief Timothy Rich's department was roundly criticized for its handling of a post prom party at Black Point Beach attended by approximately 150 people - many of whom were underage. The party led to four arrests as well as claims of police brutality and harassment.

Five years later, the incident still resonates with Chief Rich, who says his department was unfairly vilified in the press and in the court of public opinion.

"There was a lot of talk at the time about officers using excess force, and somehow the fact the officers were pelted with bottles and rocks, and one officer was hit in the head a flashlight, was kind of left out of the conversation," he said.

Chief Rich said the incident was a prime example of a beach party that needed breaking up in the name of public safety. After the property caretaker called the police, officers quickly realized that a vast majority of the people there were underage, and that many were intoxicated and in no shape to drive.

Still, he said, officers did not look to make arrests first, but instead searched out sober drivers and starting sending people on their way.

Tensions escalated when a young man kicked a hay bale into the fire and officers tried to put him in handcuffs. Some shoving followed, and in the ensuing struggle, youths threw a flashlight and beer bottles and officers responded with pepper spray.

Chief Rich said the after-prom incident was unfortunate, but he said it did not change the way officers deal with beach parties. Handling such parties in Chilmark is complicated by a wide mix of public, private and quasi-public beaches, many of which have different sets of regulations. Chilmark also does not have an open container bylaw.

Chief Rich preaches a basic theme to his officers when it comes to beach parties: Be reasonable, see what's going on, and react appropriately.

"We're not going to go down on the beaches and randomly start checking identifications. But if we get a call about 100 people who are out of control and there is underage people drinking, we have no choice but to break it up," the he said, adding:

"We understand people want to hang out on the beach and have a good time, and as long as they behave and obey the law, we don't have a problem with it."

As one attendee at the recent party at South Beach observed after the gathering was broken up: "It could have been worse, [the officer] could have taken our beer."