SACRAMENTO — The headaches are mounting for Vinod Khosla.

Gov. Jerry Brown on Tuesday signed a bill requiring the State Lands Commission to negotiate public access to the shoreline at Martins Beach, an 89-acre beachfront property Khosla purchased in 2008. The decision comes on the heels of a court ruling last week that prohibits Khosla from excluding the public unless he gets a coastal development permit.

Khosla, a venture capitalist who focuses on clean energy technology, lobbied furiously against the bill, SB 968, and was able to water it down. But his team of lobbyists, led by former Assemblyman Rusty Areias, could not kill it.

The new law by state Sen. Jerry Hill, D-San Mateo, will instruct the commission to talk to Khosla about buying a public right-of-way across his private land to the shoreline. If no deal is reached by Jan. 1, 2016, the commission may use its power of eminent domain to force a sale.

The State Lands Commission oversees roughly 4 million acres of submerged land and tidelands, holding them in trust for the public. Its responsibilities include managing the state’s offshore oil-drilling leases. The agency has never used its eminent domain authority in its 76-year history.

Hill said Tuesday that the law’s success is an “affirmation of the public’s right to their beaches and the idea that no one is above the law and no one can buy a beach.”

Meanwhile, Martins Beach LLC, the listed owner of the property, issued a brief statement saying Khosla will continue to fight for his private property rights.

“The state had an opportunity to purchase the property when it was marketed for sale, but did not want it,” the statement continued. “Now pandering politicians want rights the state did not want to pay for.”

Reached by phone Tuesday, Areias said Hill’s legislation is unnecessary, and the fate of Martins Beach will ultimately be decided by the courts and the Coastal Commission.

“The bill is a remnant of what it was originally,” Areias said of the law, which in its initial form would have required, rather than sought, the commission’s use of eminent domain. “Basically it mandates a conversation. We don’t need a bill to have a conversation.”

For nearly a century, the previous owners of Martins Beach allowed the public to drive down a private road to the coast in exchange for a parking fee. But Khosla ended that practice in 2010, claiming San Mateo County was making unreasonable demands. He said he was losing money keeping the road open.

Last week San Mateo County Superior Court Judge Barbara Mallach ruled that Khosla violated the Coastal Act when his property manager locked the gate at the top of the road off Highway 1, changing the public’s ability to access the coast there. Mallach told Khosla he will need a coastal development permit to bar the public.

Mark Massara, an attorney for the plaintiff in the case, the Surfrider Foundation, said Tuesday that the gate south of Half Moon Bay remains locked. Khosla’s attorneys are mulling an appeal.

Khosla prevailed in separate lawsuit last fall when San Mateo County Superior Court Judge Gerald Buchwald ruled that Khosla’s property is exempt from coastal access provisions of the California Constitution. Buchwald reasoned that, since there was no public easement on the property in the 19th century when the U.S. government confirmed the original owner’s provisional Mexican land grant, the state could not assert a new interest in the land.

Buchwald stated in his decision, however, that he did not wish to interfere with the right of the state to use its power of eminent domain or the authority of the Coastal Commission to require some form of public access in exchange for development permits.

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