SACRAMENTO – Gov. Jerry Brown and state lawmakers have the authority to eliminate community redevelopment agencies but not force them to redirect their taxes to local services, the California Supreme Court ruled Thursday in a decision that will likely send both sides back to negotiations.

The state is counting on $1.7 billion from the agencies in this year’s budget and $400 million a year thereafter from eliminating about 400 redevelopment agencies. California is heading into the new year with a $13 billion shortfall over the next 18 months.

The justices said because the state Legislature authorized the creation of redevelopment agencies, it has the power to eliminate them. But the court invalidated state legislation that diverts redevelopment funding, calling it “flawed.”

The decision handed down Thursday said the state cannot argue those redevelopment payments are voluntary if the payments are a requirement for redevelopment agencies to continue operating.

The governor’s office did not have an immediate comment. The California Redevelopment Association also did not have an immediate response to the ruling.

Cities had argued the move was illegal under Proposition 22 in 2010, which banned the state from raiding local government funding.

The justices split the decision by affirming the state’s right to eliminate redevelopment agencies but upholding Proposition 22, saying the state could not force payments from the agencies as a way for them to remain in business.

The case not only has long-term implications for the state’s budget but also will determine the fate of redevelopment agencies, which primarily are controlled by cities and counties to promote construction projects and revitalize blighted districts. Critics say many of the agencies have strayed from that intent and instead have evolved to benefit private developers, while audits have revealed questionable projects and some misuse of money.

The justices heard arguments from both sides last month.

The governor and supporters of the law say redevelopment agencies have become little more than slush funds for private developers, and they want the tax money generated by new developments to be diverted from the agencies to local services and agencies.

Local government officials say it does not make sense for the state to eliminate redevelopment agencies, which contribute $2 billion a year in economic activity. They say the agencies are their main vehicle to rebuild communities and create jobs.

State attorneys argued that lawmakers have the authority to eliminate the agencies despite Proposition 22 because the Legislature passed legislation in 1945 allowing cities and counties to establish redevelopment agencies.

After World War II, the Legislature allowed cities to combat blight by creating special districts for redevelopment. Growth in property taxes in those areas then could be used to finance more projects, known as tax-increment financing.

In turn, the agencies have used their power to acquire property by eminent domain and sell, lease or develop the land.

California began the year with a projected $26.6 billion deficit and closed the gap with spending cuts, fee hikes and revenue estimates that were overly optimistic. The state budget called for 70 state parks to close next year, tuition increases at state colleges and universities, and cuts to schools and libraries.

In June, lawmakers passed legislation to dissolve the redevelopment agencies and a companion measure that allows cities and counties to continue their redevelopment efforts if they voluntarily funnel their tax revenue toward local services. The budget was passed on a majority vote by Democrats, who were unable to coax Republicans to support fee increases and closing tax loopholes.

Earlier this month, the governor authorized midyear budget cuts of another $1 billion.