In a major victory for California Governor Jerry Brown, the state supreme court on Thursday upheld a law that would eliminate 400 local redevelopment agencies and could divert billions of dollars to schools and other local services.

The court ruled that the state legislature was within its rights to abolish the agencies, which have long played a major role in local development projects ranging from apartment houses to train stations and sports stadiums. At the same time, the court struck down companion legislation that would have enabled the redevelopment agencies to stay in business if they agreed to pay a big chunk of their revenues to the state.

Local officials vehemently opposed the elimination of the redevelopment agencies, and a group of plaintiffs, including the California Redevelopment Association and the League of California Cities, asked the California Supreme Court to declare both laws unconstitutional.

Redevelopment agencies, widely used around the country, sell bonds to fund local development projects. They pay them off with the increased property tax revenue, or tax increment, that results from the project.

Governor Brown has argued that because of the convoluted way in which property tax revenues are divvied up in California, redevelopment agencies have the effect of diverting money away from schools and other local services. The state is then forced to fill the funding gaps for basic services while the local redevelopment agencies pursue projects that might be beneficial locally, but do little to lift the state's economy as a whole.

The most immediate effect of Thursday's court ruling will be to preserve the state budget for the current fiscal year. The budget, passed last summer, includes $1.7 billion in redevelopment funds that would flow to the state as the agencies are wound down. Successor agencies would assume responsibility for repayment of existing redevelopment bonds; projects that are already underway would in most cases go forward.

The non-partisan legislative analyst's office has estimated that the elimination of redevelopment agencies could free up $2 billion a year for schools, courts and other services.

Jean Ross, executive director of the California Budget Project, called the ruling good news for the budget.

Local officials, on the other hand, say they will lose a crucial tool for revitalizing blighted areas and promoting local economic development. Redevelopment agencies often acquire land in run-down parts of a city and invest in infrastructure improvements. They then work with private developers to build parks, convention centers, transit stations, shopping malls and apartment buildings, among other things. The agencies also help to fund affordable housing projects around the state.

The elimination of redevelopment agencies is among Gov. Brown's boldest strokes since he took office last year, and a key part of what he calls the realignment of state and local taxes and services.

Because the tax increment generated by redevelopment projects is not subject to the state-mandated formula on how local tax revenues are divided among cities, counties, schools and special districts, local officials have an incentive to rely heavily on redevelopment districts for a wide range of projects. The city of Oakland, for example, was found earlier this year to be financing some police services, and even part of the mayor's salary, with redevelopment funds.

Redevelopment critics also say the agencies have gone far beyond their mission of combating blight and often subsidize projects that either would have been built anyway, or would have been built in a nearby city.