The beach is so central to California's identity that the right of surfers and sun lovers to access the sand is guaranteed in the state Constitution.

But now so many local landowners want to block public access to their chunks of the coveted coastline that there are several hundred alleged violations pending before state officials, including a highly charged case in which Vinod Khosla, a green energy billionaire with ties to President Obama, is fighting surfers over access to a beach south of San Francisco.

Credit: Surfrider Foundation

Silicon Valley Billionaire Vinod Khosla touched off court battles after purchasing land and gating a road on his property connecting Pacific Coast Highway with the ocean.

Property owners and the public have clashed over beach access nationwide. In Hawaii, for example, the state has sanctioned landowners whose overgrown vegetation blocked paths to the strand. But the fight has proven particularly rancorous in California, where two-thirds of the state's nearly 40 million people live in the counties that hug the coast.

"We've been involved in beach access cases in New York, New Jersey, Florida, Maine, Hawaii and Texas," said Chad Nelsen, environmental director of the non-profit Surfrider Foundation, "but California continues to stand out because of the intense development pressure ... in combination with the incredible popularity of the beaches."

Along California's 1,271 mile coast, from San Diego to the foggy coves near the Oregon border, there are more than 1,150 access points, or nearly one per mile, meaning points where the public is supposed to be able to reach the beach. They range from state parks to stairways to narrow sand paths. In areas where the public has "historically used private property" to reach the shoreline, the state creates access points through that property via easement or purchase of a sliver of land. Otherwise, the public is not supposed to cross private property.

In densely populated Southern California, however, only 60 percent of the access points are actually open to the public, according to the state agency that monitors access, the California Coastal Commission. The issue is most pronounced along the world-famous Malibu beachfront, a 23-mile-long strip north of L.A. that is home to many celebrities. Of 20 points that should be open in Malibu, say state officials, only nine are usable.

Read MoreBills to regulate California groundwater use opposed by farmers

Some residents use tricks to protect their property – everything from security cameras to fake garage doors and traffic cones to block parking. Others just hire lawyers. Government officials and beach access advocates say that landowners are using the legal system to delay enforcement.

Noah Berger | Bloomberg | Getty Images

Vinod Khosla, founder of Khosla Ventures

Linda Locklin, who leads the coastal access program for the Coastal Commission, said it comes down to "the private beachfront homeowner who wants to maintain a private beach feeling." Some, she said, "will use all resources to keep it that way."

Attorney Marshall Grossman, who is on the board of the Trancas Beach Homeowners Association in Malibu, said those cases are few and far between. He said the right of property owners deserves equal weight with the rights of the public.

"That's something that is lost all too often by those who claim that the beach belongs to them without distinguishing between that part that is owned by the public and the part that has been purchased, paid for and where taxes are paid each year by individual property owners," said Grossman.

In the most famous Malibu battle, entertainment mogul David Geffen tried to block the public from his beachfront property. When Geffen purchased the property, he initially agreed to an easement that would allow beachgoers to reach the oceanfront. Later, in a protracted and unsuccessful legal struggle, he tried to block access. Now the public can reach the beach via a gate next to his home.

'Bureaucratic Overreach'

The highest-profile current case, however, is unfolding far to the north, on Martins Beach near Half Moon Bay.

Entrepreneur Vinod Khosla made billions by cofounding the computer firm Sun Microsystems, and has since poured some of his profits into green energy ventures, and some into Democratic Party coffers. He contributed $1 million to a pro-Obama SuperPAC in 2012, and last year hosted a fundraiser at his home in Portola Valley, south of San Francisco, in which attendees paid $32,400 to have dinner with the president.

He also spent his wealth on an 89-acre parcel overlooking Martins Beach, a stretch popular with surfers. His new purchase included a private road off of the Pacific Coast Highway that provided the only direct access to the beach. Because of California law, the family that had owned the property for the previous century had permitted surfers access to the beach via the road, and had also built a parking lot and charged surfers from $2 to $10 to use it. For decades, locals used the lot and enjoyed the beach.

But after Khosla purchased the property for more than $30 million in 2008, he wanted to do things differently.

San Mateo County warned Khosla that he would need to maintain the beach access provided by the previous owners and mandated by the Coastal Commission. Khosla sued the county, and lost.

In 2010, after complying with the county's wishes for two years, Khosla permanently locked his gate, blocking the road and the parking lot. He added security guards and signs reading "Beach closed, keep out."

In late 2012, a group of surfers ignored the no access warnings, walked down the road and paddled out into the waves. When Jonathan Bremmer and four of his friends came out of the water, they were arrested by San Mateo County Sheriff's Office deputies.

Credit: Surfrider Foundation

Surfers were arrested in 2012 after bypassing a locked gate to reach Martins Beach in San Mateo County, California.

Prosecutors promptly dropped charges against the so-called "Martins Beach Five" for criminal trespassing, but the incident sparked civil litigation and legislative action. Bremmer, who said that he had surfed at Martins Beach in order to test the law, filed suit against Khosla, alleging that Khosla was violating state law by blocking access.

The Surfrider Foundation filed a second suit accusing Khosla's Martins Beach LLC of failing to seek permits necessary to change the access through the property that had been allowed by the previous owners. Khosla is fighting both suits.

"If it came to a discussion about it, then I would win," said Bremmer. "But it turns out that I'm not the one with billions of dollars."

Read MoreFeds say balance struck in California logging plan

Khosla scored a legal victory late last year, when a judge ruled that Khosla was not violating the law by blocking Bremmer and the other surfers from his property because of special land rights on the specific tract of land that dated back to its pre-statehood Mexican owner. That ruling is currently under appeal.

Khosla, who declined to be interviewed on camera by NBC News, has said through his attorneys, on his Martins Beach LLC website and in the San Francisco Chronicle that he is simply protecting his freedom in the form of his private property rights and is the victim of "bureaucratic overreach."

"This dispute is about making sure private property rights are not abrogated by a runaway administrative body," said Khosla.

Khosla accused state and local officials of being unreasonable. "They have been taking an extreme view and don't want to compromise on anything," Khosla told the Chronicle. "One day out of the blue we got a letter from the county saying we had to have 1973 [parking] prices and be open 24/7."

Read MoreFeds to resume leasing for fracking in California

In June, California Governor Jerry Brown signed a bill giving the Coastal Commission power to levy fines of up to $11,500 a day against any property owner who illegally blocks public beaches. Where many of these cases used to end up in court, the new law means those cases will be adjudicated by the Coastal Commission, which may mean they will be decided more quickly.

For now, Martins Beach is open to the public. But on a recent summer day at the beach, surfer Mike Wallace told NBC News he knew his years of enjoying the local waves may end if Khosla prevails in court. "It's really ironic that somebody with those kind of green venture capital credentials is trying to close a beautiful spot like this," said Wallace.