BOSTON (AP) Tuukka Rask turned an outstanding first season as the Boston Bruins' No. 1 goalie into a long-term commitment on Wednesday by signing an eight-year contract to stay with the Eastern Conference champions.

There was little doubt that the restricted free agent would be back, especially after the Bruins cleared about $4.75 million in space under the salary cap when they sent Tyler Seguin to the Dallas Stars in a seven-player deal last Thursday.

The Bruins said the annual salary cap charge on Rask's contract is $7 million.

Boston lost the Stanley Cup finals in six games to Chicago, dropping the finale 3-2 on June 24 when the Blackhawks came from behind and scored two goals in the last 1:16.

Two days later, general manager Peter Chiarelli said, "I feel confident that we will get a deal done on Rask in short order."

That same day, Rask said he would like to play with the Bruins "forever," and the one-year contract he played under last season motivated him.

"You always try to be good but then you are trying to get your average game level as high as you can," he said, "that the gap between a good game and a bad game wouldn't be so big. I think I managed to do that this year, and it motivates me for the next year to keep that level and keep getting better."

Rask was the backup goalie in the 2011 postseason when Tim Thomas won the Conn Smythe Trophy that goes to the playoff MVP as Boston won its first Stanley Cup title since 1972. The following season, Thomas played 59 games with a 2.36 goals-against average. Rask made 23 appearances and had a 2.05 average.

Thomas then decided to sit out the last season of his four-year, $20 million contract. The Bruins suspended him on Jan. 13 for failing to report and traded him on Feb. 7 to the New York Islanders. Thomas, now 39, didn't play last season.

Rask, 26, was a worthy successor.

He was 19-10-5 with a 2.00 GAA in the regular season and then went 14-8 in the postseason with three shutouts and a 1.88 GAA.

The goalie from Finland was drafted in the first round in 2005 by the Toronto Maple Leafs and was traded in June 2006 for goalie Andrew Raycroft.

The most games Rask has played in a season is 45 in the 2009-10 campaign when Thomas, who played 43 games that season, missed time because of a hip injury that required offseason surgery.

Now Rask has developed into one of the NHL's top netminders.

Asked after the season how much he had proven, Rask said, "I don't think I have to answer those questions anymore. I played good, proved (to) everyone again that I was capable of doing it. I mean, you look at the numbers. They're good. If I just analyze my game and by how I felt throughout the year, I thought it was a great year."

Rask's best playoff series came in Boston's four-game sweep of the Pittsburgh Penguins in the Eastern Conference finals. He allowed just two goals and made 123 saves against the NHL's highest-scoring, regular-season team.

In the finals, he made 50 saves in the opener, but Chicago won 4-3 in three overtimes. Rask allowed one goal in the next two games as Boston won 2-1 and 2-0. But the Blackhawks won the remaining three games.

The next big signing for the Bruins should be center Patrice Bergeron. His three-year contract runs through next season.

Bergeron tied for the team lead with nine playoff goals and had 15 points. He led the NHL in winning faceoffs, and he won the Selke Trophy as the league's top defensive forward the previous season. He also played Game 6 against Chicago with a broken rib and separated shoulder, then was hospitalized afterward with a punctured lung.

He has said he is "very confident" he will get an extension.

Rask's signing came after the Bruins lost three unrestricted free agents. Right wing Nathan Horton signed with the Columbus Blue Jackets, 13-year veteran defenseman Andrew Ference went to the Edmonton Oilers, and backup goalie Anton Khudobin joined the Carolina Hurricanes. The Bruins weren't interested in retaining Ference, and they let right wing Jaromir Jagr become a free agent.

They did add right wings for their top two lines Jarome Iginla from Pittsburgh and Loui Eriksson from Dallas.