The battle over opening Martins Beach to the public will face a key test this week as lawmakers in Sacramento decide the fate of a bill that could clear the way for the state to purchase a public route through the property from tech billionaire Vinod Khosla.

Khosla, who co-founded Sun Microsystems and has a net worth estimated at $1.5 billion, bought 89 acres surrounding Martins Beach, south of Half Moon Bay, in 2008 and closed the gate to a private road that the public had used for generations to access the shoreline.

The measure, Senate Bill 42, sponsored by state Sen. Jerry Hill, D-San Mateo, would create a new account within the State Lands Commission that could accept outside donations, providing the agency money to take a public easement over the road by eminent domain.

“Martins Beach is a spectacular beach, one of the most beautiful secluded beaches in the state,” Hill said. “Closing off this beach sets a precedent. And if we establish that this beach should be private, we’ve opened the door to closing off other beaches in California.”

Hill’s bill has cleared the state Senate, but it’s now sitting in the Assembly Appropriations Committee, which must decide by Friday whether or not to advance the measure.

The State Lands Commission in December appraised a public right-of-way over the 6.4 acres of Martins Beach Road at $360,000. But Khosla said he would only sell it for $30 million, nearly as much as he paid for the entire property. The two parties remain at a stalemate. If the state takes the access route by eminent domain, a court would ultimately decide on the fair market value.

The issue has emerged as a flashpoint over beach access in California. Earlier this month, Khosla lost an appeals court decision in which the court ruled that he closed the gate illegally because he had not acquired a permit from the state Coastal Commission. It remains closed, but the San Mateo County Sheriff’s Office said this month that the public should feel free to ignore the no-trespassing signs. Many observers expect Khosla to appeal in the coming weeks to the state Supreme Court.

But if the State Lands Commission took the easement — essentially the right for the public to travel over the road by eminent domain — that could be checkmate for Khosla, who has vigorously fought public access, calling it a property rights issue.

An attorney for Khosla, Jeffrey Essner of San Jose, did not respond Tuesday to requests for comment.

Rusty Areias, a former state parks director whom Khosla hired as his lobbyist from 2014 to 2016, said that he thinks Khosla has decided the best venue to continue the battle is in the courts rather than the state Legislature.

“The State Lands Commission does have the power of eminent domain,” Areias said. “But Mr. Khosla has the resources and the will, and he feels injured enough that he will pursue any remedy. This is going to be a long haul. And if it goes to the U.S. Supreme Court, I’ll bet on him.”

Established in 1938, the State Lands Commission is a low-profile agency that oversees millions of acres of riverbed, lake bottoms and submerged tidelands from the shoreline to three miles offshore. It is governed by a three-member board made up of Lt. Gov. Gavin Newsom, state Controller Betty Yee and state Finance Director Michael Cohen.

Newsom and Yee have endorsed Hill’s bill as a way to provide the public access to the beach, while Cohen opposes it, saying that maintaining the pathway could impose new costs for the state.

The issue comes down to whose money would be used to seize the land through eminent domain.

In 2014, Gov. Jerry Brown signed a separate bill of Hill’s that directed the State Lands Commission to negotiate with Khosla over the sale of a public easement along the road. But although the commission has $6 million in a pot of money known as the Kapiloff Land Bank Fund for land purchases, the 1982 law that set up that fund does not allow that money to be used for eminent domain.

Earlier this summer, the San Mateo County Board of Supervisors proposed contributing $1 million toward the eminent domain effort. Supporters of opening the beach say they expect that environmental groups and others could raise more.

“I think there is a lot of interest,” said Lennie Roberts, legislative advocate for the Committee For Green Foothills, a Palo Alto nonprofit. “There could be a variety of sources: governmental agencies, land trusts, private citizens who would like to see this resolved. Certainly, this issue has garnered a huge amount of public attention.”

The bill also would shift $1 million from the Kapiloff fund to the new account, but that money could not be used for land acquisition — only associated costs such as appraisals or environmental studies.

The chairwoman of the Assembly Appropriations Committee — which will weigh in Friday on Hill’s measure — is Lorena Gonzalez-Fletcher, a San Diego Democrat who formerly served on the California Coastal Commission and authored a bill this year that would require the State Coastal Conservancy to develop a program to expand the number of campsites and other low-cost accommodations along the California coast to improve public access. Asked if she supports or opposes Hill’s bill, her spokesman, Evan McLaughlin, said this week that she does not comment on bills in her committee.

Complicating the issue: Khosla is a major Democratic Party donor who has contributed hundreds of thousands of dollars to Democrats such as Sen. Dianne Feinstein, Rep. Nancy Pelosi, Rep. Zoe Lofgren, Rep. Ro Khanna, Barack Obama, Hillary Clinton, Joe Biden and the Democratic Senatorial Campaign Committee.

But last year he enraged leading California Democrats when he sued the State Lands Commission and Coastal Commission members individually, including Newsom and Yee over the Martins Beach issue. That lawsuit is still pending.