A federal judge in Oregon has barred thrift regulators from taking over a Portland savings and loan institution and has ordered the government to honor the terms of a 1987 agreement with investors who bought the thrift.

District Court Judge Owen M. Panner also ruled that the government's efforts to undo its 1987 agreement with the owners of Far West Federal Bank of Portland would violate the Fifth Amendment, which prohibits the government from seizing property without due process or just compensation.

Like six other recent court rulings around the country, the Oregon case threatens regulators' power to tear up agreements and toughen lax regulatory guidelines that were used to attract new owners to ailing thrifts in the 1980s.

The government recently won a case against an Illinois thrift that had argued that changes in accounting rules amounted to a breach of contract.

If extended to other cases, the Oregon ruling could cost the government billions to compensate the owners of thrifts and hinder its ability to move against dozens of ailing institutions.

Government regulators said they would appeal the Far West decision. "Our position is the same as it's been," said a spokesman for the Office of Thrift Supervision. He said earlier "forbearances are no longer valid."

In court, the government argued that Congress has the power to change regulatory policies and that the strict capital standards imposed by the Financial Institutions Reform and Recovery Act of 1989 can be enforced despite the 1987 agreement with Far West.

Panner rejected that reasoning. "It is clear that the ... agreement is far more than an expression of regulatory policy," he said. He added that the agreement "sets out three methods of termination. None includes a change of heart."

In 1987, a venture capital group invested $27 million to acquire Far West, a Portland S&L that had a negative net worth of $300 million. Before making the investment, the group agreed with regulators on a 10-year plan to restore the financial health of the institution. Regulators also provided a $1.5 million loan, called "open thrift assistance," that involved no subsidy. At the time, the government was eager to avoid the cost of closing the ailing S&L and it welcomed the investor group.

After the passage of the thrift cleanup bill last year, regulators demanded that Far West revise its plan and come up with larger amounts of capital by the end of 1994. It also imposed limits on the S&L's ability to make loans and appeared to be considering the seizure of Far West.

Panner said that investors had relied on the government's word, otherwise the $27 million investment would have been "economic suicide."

He said, "The government parties bargained for something of great value to them, avoidance of Far West's failure when the deposit insurance funds were stretched to the breaking point. The private parties got something of value as well, the ability to rely on relaxed regulatory standards and access to cash, so they could make money."