UPDATE, 3/12/14, 12:15 p.m. EDT: The names of additional Skadden attorneys advising Jos. A. Bank have been added to this article’s final paragraph. Also, information on the Davis Polk attorneys representing the financial advisers to Men’s Wearhouse has been added to the eleventh paragraph.

Men’s Wearhouse and Jos. A. Bank finally found the perfect fit.

The competing clothiers put an end to a months-long standoff on Tuesday with Jos. A. Bank agreeing to be bought by Men’s Wearhouse in a cash deal worth $1.8 billion.

The two menswear retailers have been locked in a hostile courtship since October, when Houston-based Men’s Wearhouse rejected an unsolicited $2.3 billion takeover offer submitted by Jos. A. Bank before responding with its own unsolicited bid for its Hampstead, Md.–based rival the following month. The Jos. A. Bank board eventually rejected that cash offer, which valued the company at $55 per share, saying the proposal undervalued the company.

The back-and-forth process even saw each company adopt its own limited shareholder rights plan, or “poison pill,” in order to protect against a hostile takeover. In spite of that measure, Men’s Wearhouse returned in January with a sweetened, $57.50-per-share offer that it took directly to the target’s shareholders. Jos. A. Bank urged its shareholders not to act on that Men’s Wearhouse bid.

Last month, Jos. A. Bank upped the ante in its battle with Men’s Wearhouse by agreeing to buy clothing brand Eddie Bauer from private equity firm Golden Gate Capital in an $825 million deal. The deal gave Jos. A. Bank a clear strategic alternative to the Men’s Wearhouse deal, but the terms of the agreement with Golden Gate also included a provision allowing Jos. A. Bank to back out of the purchase should it be presented with a more attractive takeover offer provided Jos. A. Bank pay a termination fee valued at roughly $48 million.

That more attractive offer arrived Tuesday with Men’s Wearhouse agreeing to pay $65 in cash for each Jos. A. Bank share in a deal that values the company at $1.8 billion. The offer represents a premium of more than 50 percent over Jos. A. Bank’s closing price on Oct. 8, before its offer for Men’s Wearhouse was announced.

In announcing the deal, Jos. A. Bank chairman Robert Wildrick said his company’s board “has been rigorously focused on pursuing a path for our shareholders that maximizes value creation.”

As part of the deal—which is expected to close before the third quarter, pending regulatory approval—Jos. A. Bank has terminated its agreement to buy Eddie Bauer and has also cancelled a planned $300 million stock buyback program.

Willkie Farr & Gallagher has represented Men’s Wearhouse throughout the past five months with regard to Jos. A. Banks, and the firm previously advised the company on its high-profile ouster of Men’s Wearhouse founder, chairman and spokesman George Zimmer last summer. Corporate and financial services department cochair Steven Seidman has been leading the Willkie team along with corporate partners Laura Delanoy, Jeffrey Hochman and Michael Schwartz. Finance partner Jeffrey Goldfarb, benefits partner Michael Katz and real estate partner David Drewes are also advising along with litigation partners Joseph Baio, Mary Eaton, Deirdre Hykal, Jeffrey Korn, Tariq Mundiya, Wesley Powell and William Rooney and litigation of counsel Ian Hochman.

Willkie associates working on the deal are Laura Acker, Michael Barnett, Max Bryer, Morgan Clark, Nicole Humphrey, Meghan Hungate, Shaimaa Hussein, Jonathan Kubek, Jodi Lucena-Pichardo, Nicole Naples, Susannah Ostlund, Daniel Philion, Agathe Richard, Carly Glover Saviano, Andrew Shapiro, Marit Spekman, David Stoltzfus and Ryan Stott.