A King County judge has restored a "gain-sharing" benefit in state worker pensions that used to let some worker pension accounts receive a share of exceptional stock market gains.

The Washington Federation of State Employees praised the ruling by Superior Court Judge Richard D. Eadie, which parties in the case received Friday.

“We expect the state to appeal. But this is a pretty good victory, which we need right now,” federation spokesman Tim Welch said.

Spokeswoman Janelle Guthrie of the Attorney General’s Office said it was not clear whether the state Department of Retirement Systems would appeal.

“We received it and are reviewing it,” she said of the ruling.

The federation, the Washington Education Association and several individual state employees filed a class action suit in 2007 aimed at nullifying the state’s action that divested nearly 140,000 eligible workers from future gain-sharing benefits. Welch said it was not yet possible to say what the dollar value of the ruling could be to the plaintiffs if the ruling holds up.

Under gain-sharing, employees in several retirement plans received bonus payments into their retirement accounts when stock gains in the state pension system exceeded 10 percent over four years. The concept began in 1998, when Republicans controlled the state House and Senate.

But later analysis of the benefit by the state actuary found the state needed to put extra money into the system to brace for future obligations under gain-sharing. That proved too expensive for the state, and the Democrat-controlled Legislature repealed it in 2007 while also providing smaller benefits to the affected workers as compensation.

Eadie concluded that “the state may not divest members of gain-sharing unless that benefit is replaced with comparable new advantages.”

So although Engrossed House Bill 2391 did provide some benefits for retirement Plan 1 and Plan 3 members who were divested by the bill, the new benefits “were not comparable in value to gain-sharing and did not counterbalance the withdrawal of the gain sharing benefit,” Eadie wrote.

The effect was an impairment of workers’ contractual rights, Eadie said.

The judge also found that Retirement Systems was a primary source of information for workers about gain-sharing but said too little and not clearly enough that the Legislature could divest members of the benefit.

Nearly 140,000 government and public-school employees stood to benefit from the gain-sharing in 2008, according to a fiscal analysis done at the time the repeal was passed in 2007. That analysis estimated the value of the then-pending 2008 distribution at $228 million.

The governor’s Office of Financial Management said it would need a few days before it could estimate the financial effect of the ruling. But Guthrie of the Attorney General’s Office noted that a state actuary’s estimate prepared in 2007 said state costs could be $6.7 billion over 25 years without the repeal.