The beaches of this chic resort, popular with and populated by film stars, have become the unlikely battleground for a fight between the French Socialist government and members of its partner in governance, the Communist Party, and Brigitte Bardot has already proclaimed herself the leading casualty.

What started as a stunt organized by French Marine Minister Louis Le Pensec to demonstrate, in good Socialist fashion, the public right of access to beaches as laid down by law in 1681 under the notably non-Socialist Louis XIV, quickly turned into a national joke.

Le Pensec, leading the charge in white suit and blue tie and accompanied by reporters and police, ordered a bulldozer to destroy the enclosure of a private beach belonging to a beachfront villa. His embarrassment began when he learned the owner of the villa was Lucette Thomazo, 56, a Communist Party member and one-time official of the party's newspaper, L'Humanite.

"We are victims of a serious injustice. My husband and I are militant and convinced Communists," Thomazo declared. She threatened legal action and suggested that the Socialist minister could better have made his point by attacking the beach enclosure of one of her neighbors, who include Bardot and conductor Herbert von Karajan.

Le Pensec sniffed that his ministry did not take people's political leanings into account when applying the law. Ministry officials insisted there could be no exceptions--on the Riviera or elsewhere--to the law opening beaches to all people.

Bardot, 47, who has been associated with St. Tropez since the late 1950s when her presence helped transform it from a quiet fishing village into a popular resort, like other famous residents has a special permit for the wall that protects the beach behind her villa. Her permit comes up for renewal at the end of the year and officials indicated there would be no exception.

Bardot said that if the wall goes, so does she.

"People try to approach me, to steal a souvenir towel on my beach, to photograph me," she told a radio interviewer. "If the wall is destroyed, these people will be in my bedroom. If I am obliged to destroy the wall, I will do it, but I will never put foot in the house again.

"Will it make people happy to destroy that little piece of cement? I am not a snob, I ask only to live simply and quietly in the country whose colors I have held high. When I think of the foreign exchange I have brought France . . ."

"If they harass me, if France becomes unlivable, I will leave for Mexico or any country with sun," she added.