Privates Beach is named not for its exclusivity but for a permissive attitude toward nude sunbathing. This small patch of paradise on the California coastline is adored by locals, and anyone is welcome to enjoy the clean and quiet spot. If, that is, they have a key costing $100 a year.

A 9ft iron gate blocks the path to a beach staircase, set among expensive hillside homes in the tony surf town of Santa Cruz, south of San Francisco. Yet by California law, all the beaches along its 840 alluring miles of coastline belong to the people, and the state is cracking down at Privates and elsewhere in a push to mitigate a growing divide between rich and poor.

Resistance from those who want to keep Privates private will be stiff – they say the situation is far more nuanced than a class war. “I am an advocate for this thing – everyone is who lives around here,” said the professional surfer Shawn Dollar as he loaded a paddle board into his car in the parking lot outside the gate. “It’s nice here. People pick up dog poop and there’s no trash.”

Officials are well-versed in such disputes. The Coastal Commission has been working since the late 2000s to open Martins Beach, also south of San Francisco, after the billionaire venture capitalist Vinod Khosla purchased the 89-acre Half Moon Bay property for $37m and promptly closed off the only road to the waterfront. Even though he has repeatedly lost in court, Khosla is now taking the issue to the supreme court – which could threaten public beach access across California by setting a precedent that limits the state’s regulatory powers.

Shawn Dollar: ‘‘It’s nice here. People pick up dog poop and there’s no trash.’ Photograph: Dan Tuffs/The Guardian

Khosla, for his part, told the New York Times last month that he has buyer’s remorse over the whole ordeal.

“If I were to ever win in the supreme court, I’d be depressed about it,” he said. “I support the Coastal Act; I don’t want to weaken it by winning. But property rights are even more important.”

“I mean, look, to be honest, I do wish I’d never bought the property,” he said. “In the end, I’m going to end up selling it.”

Meanwhile near Santa Barbara, a homeowners association have blocked off 8.5 miles of coastline, and the only way for non-residents to access it is to rent a boat, anchor offshore, and swim or boogie-board the rest of the way in. The state is considering using eminent domain to regain access. It has also spent the last 40 years fighting property owners in Malibu who blocked their beaches, and at the end of 2016 it issued more than $5.1m in fines.

A sign outside Privates Beach. Photograph: Dan Tuffs/The Guardian

Three reports released in 2017 by researchers at Stanford Law, Berkeley Law, UCLA and San Francisco State University all found that residents along California coasts are more affluent and more white, and that there are significant physical and financial barriers for others who want to enjoy the beach – even though it is legally a publicly owned resource. “Because disadvantaged communities typically have fewer economic and recreational resources and opportunities, foreclosing any of the ones they do have will disproportionately affect them,” the Stanford researchers wrote.

According to advocates, what’s happening at Privates is different. They point to the care they lavish on their walkway, and staircase down to the sand and argue that overcrowding and mismanagement by the state, which is facing a parks maintenance backlog, will result in its degradation.

“It is everyone’s favorite park,” said Mark Massara, the attorney representing the Opal Cliffs recreation district in its efforts to keep the gate and fee structure. “It is only coastal staff, from their ivory tower, that wants to make this into some sort of Malibu scenario where you have elitists trying to privatize the coast.”

Rather than a land-grab by rich property owners, he emphasizes that the community has held permits since the 1980s and has made the beach what it is today. The fee, Massara explains, is necessary to keep the area as polished as it is. “Wouldn’t it be a shame if the district goes out of business and then this turns into an ugly little overgrown horrible park with trash and everything else?”

People on Privates Beach. Photograph: Dan Tuffs/The Guardian

According to staff reports and court documents this is the only public beach in the state blocked by a privately issued fee, a direct violation of the Coastal Act, which holds that wet sand to the high-tide point can’t be privately owned or restricted.

Jennifer Savage, a policy manager at advocacy organization Surfrider, sees the gate as an inequality issue. “There’s a growing awareness of the intangible barriers that keep people from being able to access the coast because of income,” she said.

“We hear the rationale that allowing public use of a public beach will result in crime and trash and the destruction of our natural resources. And, certainly, not all people in all instances are perfect stewards,” she added. “But if we wanted to really protect the natural ecosystems, then you could make an argument that people should not be allowed to go anywhere and all of our parks and beaches should be gated off from general use. That’s not the way that we do things, at least in California.”

Oddly enough, Dollar, the pro-private Privates surfer, doesn’t even have a key, but says he always is able to get in. Recently, in an attempt to work with regulatory officials, the gate has often been left unlocked, and remains so throughout the summer. California regulators, he sniffed, are “putting their hands in everyone’s business”.