Ludovic Cruchot (played by Louis de Funès), a highly uptight gendarme in a small French village, has been reassigned to the seaside commune of Saint-Tropez under the orders of Command Sergeant Major Gerber (played by Michel Galabru), who takes no lip from his outspoken new subordinate. His daughter Nicole quickly adapts to the life in the city and, much to Cruchot's traditional-minded chagrin, begins to mix with the local carefree youths who often blatantly defy her father's official authority. However, they ridicule her at first, so she states her father is a rich American named Ferguson who has arrived to the port with his yacht. He also owns a red Mustang.
Soon, the gendarmes find themselves confronted with a major problem: a group of persistent nudists. Any attempts to arrest them in flagrante delicto are foiled by a lookout; but after several failures, Cruchot manages to hatch a master plan and succeeds in getting all the nude swimmers arrested.
Later, Cruchot discovers that his daughter and her new boyfriend have stolen and crashed Ferguson's Mustang into a ditch, puncturing a tyre in the process. Unbeknownst to any of them, Ferguson and his teammates are a gang of robbers who have stolen a Rembrandt painting, which is still in the trunk. Cruchot manages to get the car out, but realizes that the objects he threw out of the car to fix a puncture, including the painting, are valuable items.
The man who pretends to own the painting then kidnaps Cruchot, but Nicole and her friends knock out the group that kidnapped her father, and the painting is returned to its rightful owner.