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.