KEY WEST, FLA. - As night falls on Duval Street, dazed tourists stumble from bar to bar, taking in decked-out drag queens, comely strippers and other entertainments considerably more outrageous. In the dark corners of some of Key West's gay clubs, things go on that, even here, most people do not talk about in public. It takes a lot to shock people in Key West. If you come to town, the thinking goes, you may as well forget about prudishness and propriety.

And yet the southernmost city in the contiguous United States, long considered beyond the reach of mainland mores, is undergoing a struggle over its morals.

City officials, who braced themselves for Friday's start to Fantasy Fest, an annual 10-day bacchanal that draws about 80,000 people and exceeds the blowouts of New Orleans at their most bizarre, are trying to crack down on the more outlandish aspects of Key West's sexually indulgent ways.

This month, the City Commission passed an ordinance that limits strip clubs, clothing-optional bars and X-rated video stores, and spells out that sex in public is illegal.

But some things remain sacred: a clause to require body painters to shield their naked patrons from view was struck from the ordinance.

"It does get pretty raunchy," John Jones, the assistant city manager, said in an interview. "We're trying to be more family-oriented, but it's still an adult town. I wouldn't advise anyone to bring their children to Fantasy Fest."

The effort against blatant displays of sexual behavior comes as city officials have begun forcing homeless people to bunk down in tents next to the Monroe County Jail and have ordered the police to arrest violators of regulations on open containers anywhere but on the busiest blocks of Duval Street, where enforcement would mean arresting just about everyone.

"Good God, this is turning into a Republican town," proclaimed a local Web site that advertises itself as "the gay information source for Key West."

In Key West, where representatives of the various preferences operate in a relatively harmonious alliance, it is widely assumed that there is sex in the back rooms of some of the clubs, mostly in the gay ones but sometimes in the straight ones.

Jones, 72, the assistant city manager, said there were certain things the city could not stop.

"If you're a young man and you want to make out, no matter what your sexual preference, you can pretty much do it in Key West," he said. "We tolerate it to a certain extent, as long as you don't do it in public. If you flaunt it, you're going to be busted."

The new ordinance establishes that the town's 14 strip joints and pornographic book and video stores, as well as a clothing-optional resort, a clothing-optional restaurant and two clothing-optional bars, may remain in place but makes it much harder for new licenses to be issued for such businesses.

"We do want to keep our uniqueness and funkiness," said Tom Oosterhoudt, one of the City Commission's five members and its only openly gay one.

"What we don't want is major strip-joint chains on every corner, so it looks like Anywhere, U.S.A."