Surfers, lawyers and legislators hugged and high-fived Monday at an impromptu party on a sandy cove in San Mateo County after the U.S. Supreme Court decided not to take the case of a tech billionaire who wanted to block public access to the beach.

The decision means lawyers for Vinod Khosla, co-founder of Sun Microsystems, will not get the opportunity to argue before the high court that he has a right to stop people from crossing his property to reach a picturesque beach.

Advocates for public access touted the decision, which keeps an access road open to Martins Beach, about six miles south of Half Moon Bay, as a victory for beachgoers across the country.

“Money cannot buy justice, and arrogance cannot stop the public’s right to use our beautiful ocean,” said Joe Cotchett, the lead attorney for the Surfrider Foundation, which filed suit against Khosla. “Remember, this case is all about the public. That’s who it’s for. ... It’s about the right of anyone — child, adult — to go down to fish, go down to swim, but, more important, to have access to our wonderful ocean.”

The crescent-shaped cove, featuring a distinctive pyramid-shaped rock, has been the subject of an ugly, almost decade-long clash between Khosla and surfers and other beachgoers that began when Khosla blocked the only road leading to Martins Beach. The Supreme Court’s rejection of the case now prevents the battle from becoming a test case for public coastal access around the country.

Now Playing:

Cotchett joined state Sen. Jerry Hill, D-San Mateo, representatives of Surfrider and a crowd of celebrants at Martins Beach on Monday, where they laughed and joked about the decision.

Now Playing:

“In the old days there was a big sign that said, ‘Welcome to Martins Beach,’” said former U.S. Rep. Pete McCloskey, stood in front of the gate and reminisced about hay rides down to the cove in his youth. “This is the most beautiful beach in California and that son-of-a-gun would have kept it from the public.”

McCloskey jokingly urged Robert Caughlan, a San Mateo surfer known as “Bird Legs,” to put on his swimsuit and give the crowd a demonstration, but the 75-year-old former president of Surfrider said he was happy enough on dry sand.

“It’s big time,” Caughlan said about the decision. “Why is access to Martins Beach important? For the same reason access to Yosemite is important. It’s a public treasure.”

Khosla’s decision to hire Paul Clement, a high-powered Washington, D.C., lawyer, and appeal the case to the Supreme Court had caused anxiety in the California Legislature and in legal circles that the court, which opened its new session Monday, would undo decades of law upholding public access to beaches.

Khosla claims the order requiring him to open his land to the public without just compensation is tantamount to stealing his property.

Another of his lawyers, Dori Yob Kilmer, said Monday that Khosla will comply with the lower court decision and apply with the California Coastal Commission for a permit to restrict access. She signaled the fight is far from over.

“No owner of private business should be forced to obtain a permit from the government before deciding who it wants to invite onto its property,” Kilmer said in a statement. “Contrary to popular opinion, the case we filed in the U.S. Supreme Court is not about access to the beach. Other courts already ruled no public access rights exist on the property.”

She was referring to a 2013 ruling by San Mateo County Judge Gerald Buchwald saying the beach was subject to the 1848 Treaty of Guadalupe Hidalgo, which ended the Mexican-American War and required the United States to recognize Mexican land grants. Buchwald was saying, in essence, that the beach had been in private hands long before laws were passed requiring public access to the coast.

Had the Supreme Court taken the case and ruled in favor of Khosla, it would have affected as many as 22 states that have granted the public the right to access beaches, lakes and waterways, Surfrider’s Cotchett said.

“The most conservative and divided Supreme Court in my lifetime confirmed that even a billionaire who refuses to acknowledge that the law applies to him, and retains the most expensive attorneys he can find, cannot create a private beach,” Cotchett said. “Beaches are public in California, and the immensely wealthy must comply with the Coastal Act just like everyone else.”

Khosla, founder of Khosla Ventures, a Menlo Park venture fund with more than $4 billion under management, bought Martins Beach and the surrounding coastal lands for $32.5 million in 2008. He shut the public access gate in September 2010, citing the cost of maintenance and liability insurance.

Surfrider sued Khosla in 2013, arguing that the shoreline belonged to the public and had been open to all comers since at least 1918. After a series of back-and-forth rulings, San Mateo County Judge Barbara Mallach ruled in 2014 that Khosla should have obtained a development permit from the California Coastal Commission before shutting the gates.

A state appeals court agreed in August 2017, saying the closure was a type of property development that required the commission’s approval and that his failure to obtain a permit before blocking access to Martins Beach was illegal. Khosla took his case to the nation’s high court after the California Supreme Court denied review of his appeal last October.

Khosla’s legal team, led by Clement, told the court that any interference by the state with his “fundamental right to exclude the public from private property” would be a type of confiscation — a “taking,” in legal terms — that requires compensation under U.S. Supreme Court property-rights rulings.

In asking the top court to grant a review, Clement claimed the state courts wrongly decided that “owners of private beachfront property in California may not exercise that right without first obtaining the government’s permission.”

At stake was the 1972 California Coastal Zone Conservation Initiative, which created the 12-member California Coastal Commission. The California Coastal Act, passed in 1976, prohibits homes or developments from blocking access to beaches, essentially making the entire California coast, including all beach property below the mean high-tide line, public property.

“This lawsuit began as a modest claim that the Coastal Act’s permit requirements apply to everyone,” said Eric Buescher, another lawyer representing Surfrider. “It grew into a fight over the future of public access along over 1,100 miles of coast in this state.”

Khosla, who has offered to grant an easement over his property for $30 million, was threatened with fines of up to $11,250 a day, or more than $4 million a year, for violating Coastal Commission rules. He has been opening the gate periodically.

Lisa Haage, chief of enforcement for the coastal commission, said in a statement that multiple courts including the U.S. Supreme Court have upheld the Coastal Act’s protections.

“This case reaffirms that you cannot make a unilateral decision to shut down a beach that has provided generations of families with memories,” she said. “We will be considering how to proceed and hope the owner will work with us ... ”

The beach party was nevertheless muted over Khosla’s embrace of the Treaty of Guadalupe Hidalgo decision and the possibility of more litigation over the Coastal Commission permit. Cotchett said he fielded calls from officials stretching from Maine to San Diego expressing their worries that courts might — if Khosla keeps filing lawsuits and appealing them up the chain — eventually agree to allow roads and trails leading to thousands of beaches to be blocked by wealthy property owners.

“This battle is not over,” Cotchett said. “This battle is beginning.”

Peter Fimrite is a San Francisco Chronicle staff writer. Email: pfimrite@sfchronicle.com Twitter: @pfimrite