Back home in Gaithersburg, they were Eagle Scouts and star soccer players. But standing in line outside Ocean City's only under-21 dance club Sunday evening, the roughly one dozen friends from Quince Orchard High School were simply ready to party.

"Tonight H2O . . . invites you to the mother of all foam parties!" blared the club's radio commercial earlier that day. "Dress to get wet!"

The ads for the soap-suds-filled party air almost daily in this coastal resort town during June, when 100,000 high school seniors flock to the city to celebrate the beach, graduation and, for many, their first taste of freedom from home. And every year, for as long as anyone can remember, Ocean City has been waiting for them with open arms.

"It's a town that doesn't just take their money," police spokesman Barry Neeb said. "We're one of the few resorts in the mid-Atlantic that -- I don't want to say embraces them, but welcomes them."

Sunday night was the first time that Quince Orchard senior Jessica Crippin, 17, had ever been clubbing. She and her friends had arrived in Ocean City at 7 a.m. the previous day after a four-hour drive fueled largely by Red Bull energy drinks. The group was staying in two houses on 67th Street, one for the boys and one for the girls. Tonight would bring them one memory closer to the end of adolescence.

Crippin and her friends took their place in the long line in front of H2O about 8 p.m. to secure the $10 half-price cover charge. About forty-five minutes later, they were ushered in. The sun was still shining, but inside the club flickered neon.

"Where do we go?" Crippin asked, turning to her friends as they huddled close. En masse, they moved toward the packed dance floor.

The lighting was labeled "early ambient" on the control panel manned by Larry Love, the club's director for entertainment. He was saving the more blinding effects until later in the night.

Love had turned the music up loud while the teenagers were waiting outside, bass booming. That way, the kids could hear it and get pumped up before they even walked through the door. Bartenders organized glow-in-the-dark ice cubes that would light up the club's alcohol-free frozen drinks. About five minutes before showtime, Ocean City Mayor James N. Mathias Jr. dropped by.

Dressed for a walk along the boardwalk, a set of headphones dangling around his neck, he shook hands and slapped backs with the club's management. His mother, Dolores, 77, owns one of the buildings that houses the club.

"These guys are good guys," he said. "They look out for the kids."

His visit was brief. The clock was ticking. The Class of 2005 was waiting.

"Are you ready, Larry?" asked George Basle, the club's janitor, just before doors opened. "It's a battlefield."

Tourist Season

The fate of H2O -- and Ocean City -- hinges on the roughly 14 weeks of prime tourist season. Club managers Ralph DeAngelus and Robert Rosenblit open H2O and their 21-and-older bars known as the Party Block from mid-spring to early September for the three months of summer. Business has been slow this year because of the cold spring. DeAngelus is counting on nights like Sunday to make up for it.

So he and his partner are trying their hardest to give the seniors a beach week they will never forget. Sudsy bubbles will cover the dance floor for tonight's "foam party." Cages for girls to dance in are propped up all over the club, and the deejay will hold a "booty shake off." The bar -- serving water, Coke and Pimp Juice, a "hip-hop energy drink" -- is staffed by waitresses in cropped T-shirts and flippy miniskirts.

Catering to the high school crowd is a tightrope walk, and almost every business and government agency in Ocean City is focused on the balancing act during June. Souvenir shops hawk T-shirts with "Senior Week 2005" written on what looks like beer labels. The Ocean City Police Department has hired 105 seasonal officers. Roughly half the department is stationed along the 33 blocks of the boardwalk saturated with seniors.

Sidewalks bear spray-painted warnings, "Safer to cross at light." Students receive free bus passes from the city to keep them from driving. The city also has begun a "Play It Safe" program of month-long activities, such as karaoke and miniature golf tournaments, to keep kids out of trouble.

H2O is one of the program's sponsors. Security guards at the club are armed with breathalyzers to catch underage drinkers. And at the Party Block bars, tiny security cameras snap digital pictures of patrons and their IDs to help keep minors out.

"The Ocean City police have been dealing with sneaky senior weekers for a long time, and they will not be fooled by you drinking beer out of a Pepsi cup on the boardwalk," warns H2O's Web site under the heading "Stay Out of Jail." "The fine you will receive is not worth the risk."

During just one week this month, police handed out 422 citations to underage drinkers and 40 more to the adults who bought alcohol for them. And that's not counting the number of teenagers arrested for violating open-container laws. A casual observer saw six youths getting handcuffed near the boardwalk over two days.

And yet Mayor Mathias believes that senior week is here to stay.

He has fond memories of his own senior week in Ocean City in 1969, when he hung out at Ninth Street and the boardwalk, he said. It was then he fell in love with the city.

His family moved to Ocean City in 1972, and his father bought an old parking lot near the foot of the boardwalk and turned it into an arcade. Mathias remodeled the arcade into a pool hall after his father's death. When that shut down in 1999, he toyed with the idea of turning the space into a rock-and-roll club, an Irish pub and even a Beatles museum. But perhaps it's fitting that the building now caters to the teenagers on the same summer sojourn that Mathias made 36 years ago.

"That whole socialization thing was a part of my life, and I saw how important it is to teenagers," Mathias said.

He is unapologetic about courting the high school crowd. They help fuel the economic engine in Ocean City, which becomes the largest city in Maryland next to Baltimore over the summer, according to its police chief. And to Mathias, teenagers are part of the lifeblood of the city.

"I tell you what," he said at dinner one night, pointing to a table of teenagers nearby, "they're going to come back to Ocean City. They're going to remember this week. . . . A city has to remain vital. It has to be dynamic, man. It has to reproduce itself. And that's what senior week is about."

'The Hottest Girl'

Crippin and her friends from Quince Orchard devised a contingency plan in case they became separated at H2O on Sunday night: They would meet by the first row of seats on the left of the club. But 17-year-old Brett Holtzman couldn't resist announcing his own plan: "Yeah, if anybody needs me, I'm going to be with the hottest girl in there."

The foam would be his icebreaker. He would blow a few bubbles toward her, and if she laughed and responded, he would know he was in.

But in reality, Brett wasn't able to see much of anything once they got back inside the club. The floor was more packed than before.

"I was dancing with this girl, but I didn't have my glasses on, so I don't know if she was ugly or not," he told his friends.

Another friend responded: "The girl I was dancing with, I didn't even see her face!" He turned to his friends for a rating. Thumbs down.

No matter. The foam was about to be released. The girls stationed themselves inside the cages, while the boys made their way into the thick of the dance floor next to the "cannon" that would spray suds over the crowd.

"H2O Foam Party has got to do one more senior check!" called out Mike Wells, aka DJ Kinetik. "Any Maryland in the house?"

The shouting was deafening. Then the foam cannon shot the night's inaugural blast, and the shouting got even louder.

"Yeah, yeah, yeah, the foam is on. The foam is on!" Wells announced.

Above the crowd, someone tossed down glow-in-the-dark necklaces. The teenagers waved their hands in the air to catch one. And they left them there, even after the necklaces were gone.

Jennifer Chen, left, and Julie Fry, graduates of Quince Orchard High School in Gaithersburg, get cooled off in their condo fountain in Ocean City.Girls dance inside cages at H2O, Ocean City's nightclub for those under 21, where the nonalcoholic drinks are cooled with ice cubes that glow in the dark.Young people line up at H2O in Ocean City, which draws 100,000 teenagers in June for senior week activities, under the watchful eye of the police force.