Josh Gorges traded to Sabres

What was starting to look like the beginning of an ugly divorce between the Montreal Canadiens and Josh Gorges has ended with the veteran defenseman being traded to the Buffalo Sabres in exchange for a second-round pick in 2016.

The Canadiens announced the move on their official website. The second-round pick was one previously acquired by the Sabres from the Minnesota Wild, according to the release.

Gorges emerged as a surprising name on the trade block earlier this week, and the longtime Hab seemed both shocked and unsettled to learn that Montreal general manager Marc Bergevin was actively trying to ship him out of town.

The 29-year-old blueliner, who has four years remaining on a six-year $23.4 million deal, exercised his no-trade clause to veto a deal Monday that would have sent him to the Toronto Maple Leafs.

Gorges tweeted his thanks to the Canadiens and their fans on Tuesday.

The Canadiens' trade plan for Gorges was believed to be motivated by a desire to clear cap space. The Habs have yet to sign Gorges' defensive partner, restricted free agent P.K. Subban.

Also Tuesday, the Canadiens signed free-agent forward Manny Malhotra to a one-year deal worth $850,000.

The Associated Press contributed to this report.