SACRAMENTO, Calif.—The California Senate Friday approved $4.7 billion in funds for the state's high-speed-rail plan despite growing opposition to the project, handing a victory to Calif. Gov. Jerry Brown, a major proponent of the train.

The legislature's approval of the funds was needed to help ensure another $3.2 billion in matching federal funds for the bullet train between Los Angeles and San Francisco. President Barack Obama's administration committed those federal funds to the project mostly from his economic-stimulus package in 2009.

The $4.7 billion is part of nearly $10 billion in state bonds that California voters in 2008 earmarked for the train. "I'm very happy with the outcome," Senate President Pro Tempore Darrell Steinberg told reporters afterward. He called the bullet train among "the biggest and the boldest public works projects in California."

The result comes amid growing antirail sentiment in the state, a turnabout from 2008, when 53% of voters passed the rail-bond measure. Issues including rising costs have turned public sentiment against it. Opponents of the measure have cited high costs from a project now estimated to run $68.4 billion, or 52% higher than 2008 estimates of $45 billion.

In a poll Thursday by the San Francisco-based nonpartisan Field Poll, 56% of likely voters said they would oppose the rail project if it were on the ballot again.