Even if state officials can scrape together the billions of dollars needed to fund California's ambitious high-speed rail plans, lawsuits from cities and opposition groups could delay, divert or derail the project.

In the Bay Area, cities and nonprofits are suing over issues with the route and environmental studies. In Southern California, the city of Palmdale (Los Angeles County) has gone to court over fears that rail officials will abandon a planned Antelope Valley line through the city and reroute the tracks up Interstate 5 instead.

Perhaps the hardest-fought battle is yet to come in the Central Valley, where Kings County officials and residents say they'll do everything in their power to stop a 100-mile stretch of track from wiping out thousands of acres of prime farmland between Fresno and Bakersfield.

The biggest obstacle facing the beleaguered bullet train is probably its uncertain financial future. But lengthy court battles also could affect the project by delaying construction, increasing costs and altering the course the train takes through the state.

According to estimates by the California High-Speed Rail Authority, rerouting the high-speed line to satisfy stakeholders could add hundreds of millions, even billions, of dollars to the final price tag.

At the moment, ground zero for opposition to the project is Kings County. It's a crucial region for the project because federal requirements attached to almost $3.5 billion in stimulus cash dictate construction must begin in the valley. If rail officials are unable to spend those funds by September 2017, the federal government could divert them elsewhere.

Kings County farmland

In Kings County, lawyers are preparing objections to a recent draft environmental study. Local officials and residents say that if their complaints fall on deaf ears during the legally required public comment period, they are ready for a fight.

"Some higher authority needs to put a stop to this," said Diana Peck, director of the Kings County Farm Bureau. "If we've gone through every single channel up the chain, then, of course, it's going to end up in court."

At the heart of the county's frustrations is the rail authority's refusal to consider running the high-speed trains along the Highway 99 corridor. Instead, the line veers off the highway south of Fresno to follow the Burlington Northern Santa Fe Railway freight line. Then it breaks away again to swerve through farmland, dairies, homes and anything else in its path, eventually meeting up with the highway again near Corcoran (Kings County).

Last month, the Kings County Board of Supervisors sent Federal Railroad Administrator Joseph Szabo a 21-page letter complaining that state officials had illegally shut local agencies out of the planning process and ignored laws that protect prime farmland.

"This top-down, agenda-driven type of land use planning will not stand in Kings County," the supervisors wrote.

Concerns about curves

Rail authority spokeswoman Rachel Wall said officials rejected the Highway 99 alignment largely because of concerns about curves slowing the high-speed train, as well as noise and other effects on cities along the corridor.

Wall said the trains will be able to reach top speeds of 220 mph along the freight line and through farmland - a key factor in ensuring the Los Angeles-San Francisco trip can be completed in less than three hours.

Wall added that the authority has held hundreds of meetings with Central Valley communities to explain the rail plan. "That process has been going on," she said. "We have extended those invitations."

The two other legal challenges are being waged in the Bay Area and in Los Angeles County.

On the Peninsula, a coalition of cities and citizens groups has taken the rail authority to court twice over environmental studies of the route linking the Central Valley to the Bay Area.

The petitioners in the first lawsuit won, forcing the authority to redo its environmental study for that segment. The most recent suit, filed last year, challenges the revised study and accuses the rail authority of using faulty ridership estimates to make its preferred route seem more attractive.

To connect the Central Valley to the Bay Area, rail officials want to run tracks over Pacheco Pass, through Gilroy to San Jose, and up the Peninsula to San Francisco.

Fearing noise and blight from elevated tracks, the plaintiffs - which include the cities of Palo Alto and Menlo Park, as well as several nonprofit groups - argue that a better option would be to route the train over the Altamont Pass, farther north, and along I-580 through the East Bay. There, the line would split, running across the bay to San Francisco and southwest to San Jose.

Palmdale wants station

It's a much different story down south in Palmdale, where local officials have fought not to prevent the intrusion of high-speed trains, but to keep a rail station in town.

In a lawsuit filed in federal court in July, city officials said they were promised a high-speed rail station as part of an Antelope Valley line that would connect Los Angeles to the Central Valley.

They asked the judge to halt a study of an alternative route through the Grapevine. Rail officials rejected the Grapevine route in 2005, saying it was too expensive and fraught with seismic and environmental perils.

The judge dismissed the lawsuit last week, agreeing with rail officials that the issue was outside the jurisdiction of a federal court. But city officials could continue the legal battle by refiling in state court.

Rail agency spokeswoman Wall said the authority hasn't abandoned the Antelope Valley line but is legally obligated to study all possible routes.

"If the Grapevine is now a feasible alternative in comparison with what we know about Antelope Valley, we have a responsibility to study that," she said.