Ailing Greenwich Savings Bank in New York City will be merged immediately with New York's Metropolitan Savings Bank, the Federal Deposit Insurance Corp. announced last night.

The merger follows several weeks of negotiations between New York State banking authorities and the FDIC on how best to rescue Greenwich. It will be the biggest supervised thrift merger in the nation's history.

The FDIC, because it will assume responsibility for repayment of loans by Greenwich to the Federal Reserve Bank of New York, will suffer a $185 million loss in the merger, an FDIC spokesman said.

FDIC Chairman William Isaac said, however, the rescue was approved because the failure of the bank "besides the severe psychological impact, would have resulted in a gross cost to the FDIC of more than $800 million. The loss on this transaction is substantially lower."

The Metropolitan Savings Bank had previously announced a merger with the Brooklyn Savings Bank. That merger was approved by the FDIC last month.

Both Greenwich and the Metropolitan have assets of $2.2 billion. The Brooklyn Savings Bank has assets of $1.6 billion.

The combined bank will operate under the name of the Metropolitan Savings Bank with assets of $5.9 billion, making it the second-largest savings bank in the nation.

If Greenwich had failed, it would have been the largest failure of a commercial or savings bank in U.S. history and the first failure of a savings bank. A commercial bank, Franklin National, now holds the record as the largest to fail. It had deposits of $1.4 billion when it went under in 1974.

Greenwich's financial troubles have received widespread attention in recent weeks, and rumors of an impending failure finally forced regulators to admit they were searching for a merger partner.

Mutual savings banks are owned by their depositors, and their net earnings are available for distribution among the depositors. They are governed by a board of self-perpetuating trustees.

Like many thrifts throughout the country, Greenwich encountered problems that arose because it held a large portfolio of low-yielding long-term mortgages that must be supported while outside borrowing costs and interest rates have soared.