REDWOOD CITY — In a resounding affirmation of the public’s right to access the California coast, a San Mateo County Superior Court judge on Wednesday ordered Silicon Valley mogul Vinod Khosla to reopen the road leading to the popular Martins Beach.

The decision closes a chapter in one of the most famous brawls in the 38-year-history of the California Coastal Act.

Judge Barbara Mallach found Khosla, co-founder of Sun Microsystems and a renowned investor in clean-energy technology, violated the Coastal Act by permanently locking the gate to his land off Highway 1 near Half Moon Bay. She instructed the venture capitalist to apply for a coastal development permit before seeking to close it again.

Surfers, environmentalists and other proponents of coastal access had feared a victory for Khosla would restrict the California Coastal Commission’s authority over coastal development, encouraging other private landowners to lock out the public. Khosla argued his constitutional rights were being trampled.

In the end, Mallach delivered a clear triumph for coastal advocates, upholding the Coastal Act’s broad definition of development. Development in coastal zones “does not require any physical change or alteration to land,” Mallach wrote, and includes any changes in the public’s access to, or use of, the Pacific Ocean.

“This is a great victory for the people of California,” said attorney Joe Cotchett, whose firm represents the Surfrider Foundation, the plaintiff in the case. “This decision is reverberating all over the coast.”

Cotchett said he expects Khosla to appeal the ruling — all the way to the U.S. Supreme Court if necessary.

Khosla’s attorneys, Jeffrey Essner and Dori Yob, issued a statement on behalf of Martins Beach LLC, the listed owner of the 89-acre property that features a picturesque beach lined by cliffs.

“We are disappointed with the court’s decision and will consider our options for appealing the ruling,” the statement said in part.

Essner and Yob did not respond to an email asking if Khosla will open the gate immediately, though surfers already planned a victory party there Thursday morning.

Mallach’s tentative ruling is expected to be final within 30 days without any major changes, said Surfrider attorney Eric Buescher.

Surfrider asked Mallach to impose up to roughly $20 million in fines for violating the Coastal Act, but she declined Wednesday, finding that Khosla’s property manager acted in good faith in failing to apply for a permit.

The Surfrider Foundation sued Khosla in 2013, five years after he bought the property for $32.5 million. The previous owners, the Deeney family, had allowed the public to visit the secluded beach using a private road — in exchange for a parking fee.

The Silicon Valley magnate initially continued that practice but cut off access in 2010 after San Mateo County made what he viewed as unreasonable demands. The county instructed Khosla to keep the beach open year-round, when the Deeneys had closed it during poor winter weather, and charge only $2 for parking, the cost back in 1973 when California’s coastal development laws took effect.

Khosla’s property manager locked the gate on the private road, painted over a billboard advertising the beach, and occasionally placed security guards by the gate. These actions required a permit, Surfrider charged, because they changed the degree to which the public accessed and used the ocean there.

Attorneys for Khosla argue there is no legal right for citizens to visit the beach because the previous access existed by invitation of a private landowner. They also claim there is no public land for people to enjoy.

The area between the high and low tide lines in California are typically held in trust for public use, but Khosla’s legal team maintains Martins Beach is exempt. The attorneys say the land has special status because it passed into private hands, courtesy of a federally patented Mexican land grant, before California became a state in 1850.

Mallach’s decision came more than two months after attorneys gave closing arguments in the six-day trial, which was highlighted by Khosla’s testimony that he could not recall key decisions about public access on his land.

The Surfrider case is one of four fronts in the battle over Martins Beach. A second lawsuit, brought by a group called Friends of Martins Beach, is on appeal after San Mateo County Superior Court Judge Gerald Buchwald ruled in Khosla’s favor. That suit argues Khosla violated the California Constitution.

Meanwhile, Gov. Jerry Brown has until Sept. 30 to sign or veto a bill by state Sen. Jerry Hill, D-San Mateo, that would ask the State Lands Commission to negotiate access with Khosla and possibly use eminent domain to acquire it. And the California Coastal Commission is investigating whether the public’s past use of the property has created a right of access there.

“This ruling is proof,” Hill said in a statement, “that California’s beaches belong to everyone and that even billionaires have to comply with the Coastal Act.”

Contact Aaron Kinney at 650-348-4357. Follow him at Twitter.com/kinneytimes.