Andrew Shaw signed a long-term contract with the Montreal Canadiens. USATSI

After expending two second-round draft picks to acquire him from the Chicago Blackhawks, the Montreal Canadiens announced Monday that they had signed agitating forward Andrew Shaw to a new six-year deal. Shaw was due to become a restricted free agent on July 1.

According to Chris Johnston of Sportsnet, Shaw's deal is worth $23.4 million, good for a $3.9 million annual average. Then Blackhawks were never going to be able to pay Shaw that kind of contract, which is a nearly $2 million-per-year raise from his most recent contact. Though he was reportedly willing to take a hometown discount to stay, it still would have been too tough for the Blackhawks to fit him in. According to multiple reports,

Shaw was part of two Stanley Cup teams in Chicago while playing a variety of roles. While he has the versatility to play on all four lines, he's probably at his best in a third-line type of role. The Habs are making a pretty sizable commitment, especially on term, to a player whose best attribute is getting under opponents' skin.

That said, Shaw does provide some secondary scoring as well. He has one 20-goal season in his career and has registered 137 points in 322 games. In 78 contests with Chicago last season, Shaw had 14 goals and 20 assists. Additionally, he has 35 points in 67 career playoff games.

While his role as a pest can get him into trouble in terms of penalties and suspensions -- he has 300 career PIM -- he is also one of the better players at drawing calls. It's that kind of give-and-take you have to live with if you want that kind of player on your roster. In addition to his agitating, Shaw also is a pretty solid net-front presence, which can be and has been a major benefit to his team.

The deal has some risk, of course. Committing nearly $4 million a year to a player that has never topped 40 points in a single season. Shaw's new deal does not come with a no-trade or no-movement clause, which does grant the team some flexibility. The term may make it harder to move if there is a time within the next few years they have to get rid of it, though. Additionally, based on this kind of long-term commitment, would Shaw end up being one of the players Montreal protects ahead of next June's expansion draft? There are a lot of questions that will only be answered with time.

The dollar figure should not really hurt Montreal in the short-term, though. Shaw will turn 25 next month and can play a variety of roles for the team for now. It's clear that Montreal values his style of game and his Stanley Cup experience.

"We are very pleased to have agreed to a long-term deal with Andrew Shaw," GM Marc Bergevin said in a statement. "As I mentioned last Friday following his acquisition, we are adding a solid character player to our team, a reliable player who plays with grit and a two-time Stanley Cup champion with the Chicago Blackhawks over the past five seasons. Andrew will add more leadership to our team."

While the Habs' salary cap situation isn't too challenging this year and next, deals like the one given to Shaw have the potential to become more burdensome when the team goes to re-sign Carey Price in two years and once Alex Galchenyuk gets his new contract after next season.

As far as the Blackhawks are concerned, Shaw's departure from Chicago has been met with some mixed reactions. He had become a bit of a fan-favorite and represents yet another victim of the team's tightness to the salary cap. There have been so many of those over the last two years in particular. This is one of those departures that was certainly warranted, though, even if Shaw was reportedly willing to accept a hometown discount to stay with Chicago. The Blackhawks have to be so judicious with their cap dollars and using more of them on Shaw wouldn't have been the best use. The fact that they were able to get a couple of second-round draft picks out of a player they couldn't fit in their plans is a pretty decent haul.

On top of that, Chicago GM Stan Bowman now has a little bit of added flexibility to address some of the roster holes in free agency, but they're going to have to search for value deals to fill out the rest of their roster given the large monetary commitment to the core players.