Sterling Bancorp in Montebello, N.Y., has agreed to buy Astoria Financial in Lake Success, N.Y., just a few months after other merger plans by Astoria fell through.

The $14.2 billion-asset Sterling said Tuesday that it would pay $2.2 billion in cash and stock for the $14.6 billion-asset Astoria. The deal, which is expected to close in the fourth quarter, is the biggest in banking announced so far this year.

The acquisition values Astoria at 159% of its tangible book value.

Sterling would have $29 billion in assets, $20 billion in loans and $19 billion in deposits when the deal closes.

The combination “will create one of the leading banking enterprises in the [New York City] metropolitan area and will be well positioned to deliver performance and value for our customers, shareholders, employees and communities," Jack Kopnisky, Sterling’s president and CEO, said in a news release.

"We are excited about the opportunity to … extend Sterling's business banking solutions across a substantially larger market area, while introducing Astoria's retail products to a wider financial center network,” Kopnisky added.

The agreement comes three months after Astoria and New York Community Bancorp in Westbury terminated a $2 billion deal announced in 2015. The companies struggled to get regulatory approval for the deal.

Basswood Capital Management, which had once pressed Astoria to consider selling, sent the company a letter in early December encouraging management to walk away from the deal due to changes in the market and regulatory landscape. The letter also asserted that Astoria would be able to fetch a higher price than what New York Community had agreed to pay.

Sterling was among a handful of banks that industry observers believed would have the interest and ability to buy Astoria after the New York Community deal fell through.

Sterling said it expects the deal to be about 12% accretive to its tangible book value per share at closing. The acquisition should be 9% accretive to 2018 earnings per share, excluding restructuring charges, and 16% accretive the following year.

Sterling said it expects to cut 35% of Astoria’s annual noninterest expenses, or about $100 million.

Four Astoria directors would join Sterling’s board.

RBC Capital Markets, Citigroup and Squire Patton Boggs advised Sterling. Sandler O'Neill and Wachtell, Lipton, Rosen & Katz advised Astoria.