Nudists have lost a seven-year legal battle for access to a popular tourist resort beach on Spain's southwestern tip.

The Supreme Court rejected an appeal by the Spanish Federation of Naturism against local government legislation prohibiting nudists to use beaches within the historic port city of Cadiz. The federation had argued that nudism could be considered a fundamental right to freedom of ideology as defended by Spain's constitution.

The court disagreed, saying in a ruling Friday that local authorities of Cadiz had the power to "manage properly the use of its services, equipment, infrastructure, facilities and public spaces." It said the federation had failed to make a convincing case that nudism was "at this moment, an accepted practice by the majority of beachgoers."

The ruling applies to the beaches that fringe the ancient city but nudists are permitted to use a beach outside city limits.

The federation had argued that Cadiz's city council had tried to roll back "the social progress" Spain had made in recent decades by allowing nude beachgoers to be fined up to 750 euros ($840).

Cadiz became one of Spain's wealthiest cities and was among the world's busiest ports when it got the monopoly for trade with the New World after Christopher Columbus discovered America. Gold and silver from Spain's empire flowed though Cadiz's docks, turning the city into the architectural gem that tourists flock to visit today.

Spain also gained a reputation as an easygoing beach destination in the 1950s after the mayor of Benidorm asked dictator Gen. Francisco Franco to stop police from harassing and issuing fines to women for wearing bikinis on the town's beaches.