BOSTON — Zdeno Chara gave his team a spark with his rare fight. Then he won the game with his usual blistering slap shot.

Chara and Patrice Bergeron scored third-period goals Friday to lift the Bruins to a 3-2 comeback victory against the New York Rangers.

With just under nine minutes left, Chara unloaded a low slap shot from straight away about 10 feet inside the blue line that beat goaltender Henrik Lundqvist between his pads.

After he fired his shot, Chara was knocked to the ice. When the puck went into the net, he pumped his fists in the air in celebration while still on his knees.

“I saw an opening. I put a puck on net as quick and as hard as I could,” said the 6-foot-9 Chara. “It was a good job by everybody.”

In the second period, Chara squared off with Brian Boyle of the Rangers, knocking him to the ice and bringing a loud roar from the sellout TD Garden crowd. It was Chara’s first fighting major of the season.

“I feel it’s been a while since the last time we’ve had a fight like that,” Boston goalie Tuukka Rask said. “It usually happens in the blink of an eye. It gives a team a boost and really wakes up a crowd, a crowd gets really loud. I think as a team – I can’t say we woke up – but it definitely gave us an extra boost and we never looked back after that.”

Brad Marchand also scored for the Eastern Conference-leading Bruins, who improved to 9-2-2 in their last 13 games.

Rick Nash and Ryan McDonagh scored for the Rangers, who completed a five-game trip 3-2.

Rask stopped 17 shots for Boston, which hasn’t lost in regulation at home in its last 10 games (8-0-2).

Lundqvist made 25 saves for the Rangers, who played their first game in Boston since the Bruins eliminated them in five games in the second round of the Eastern Conference playoffs last spring.

“I don’t think we played the way we needed to in the second or the third,” Ryan Callahan of the Rangers said.

“They seemed to be all over us and they eventually get the tying goal and the winning goal there. We’ve got to be better in the second and third. It wasn’t good enough.”

Boston made it 2-2 on Bergeron’s goal early in the third period. His shot was stopped by Lundqvist but caromed into the net off defenseman Dan Girardi, who was in front with Loui Eriksson of the Bruins.

“It’s nice to get one of those,” Bergeron said. “I haven’t got one in a while.”

Chara pushed Boston ahead later with his shot Lundqvist said he misplayed.

“Bad read. For some reason I was reading a high shot and then just made a bad move,” Lundqvist said. “Instead of playing it the way I should, I read his stick and I thought it was going high. I don’t know if he fell down or kind of missed it but it definitely fooled me a little bit. Tough one.”

The Bruins were called for too many men on the ice with 41/2 minutes left but held the Rangers without any good chances.

With New York trailing 1-0 in the first period, Nash and McDonagh scored 1:22 apart. Nash, playing his sixth game after missing 17 with a concussion sustained Oct. 8, tied it when he spun around near the right circle and slipped a wrister inside the left post.

McDonagh moved the Rangers ahead when his rising shot from the high slot beat Rask inside the left post. Benoit Pouliot screened Rask on the shot.

“He was right there,” Rask said.

The Bruins had jumped ahead 1-0 when Marchand one-timed Chara’s cross-ice pass under the crossbar from the bottom of the right circle for just his second goal in 11 games.

Midway into a well-paced but scoreless second, Torey Krug of Boston nailed the left post with a wrist shot. The Bruins had a handful of other good scoring bids that were shot just wide or turned aside by Lundqvist.

Both teams had excellent scoring chances in the game’s opening minutes.

Chris Kelly of Boston redirected a shot that hit the post and Carl Soderberg fired one that sneaked between Lundqvist’s pads but trickled just wide. Derick Brassard of New York cut in alone for a decent bid that Rask stopped six minutes into the contest.

Boston was coming off a 6-1 loss Wednesday night at Detroit, its first of three games in four days.

“Those kind of games do happen,” Chara said. “It’s good to bounce back and regroup from games like that.”