LOS ANGELES -- Charlie McAvoy scored with 1:13 remaining in the third period, and the Boston Bruins won their fifth straight game, 4-2 against the Los Angeles Kings at Staples Center on Saturday.
Boston moved into second place in the Atlantic Division, one point ahead of the Toronto Maple Leafs.
Jake DeBrusk scored for the third straight game for the Bruins (34-17-8), who have a point in 10 consecutive games (7-0-3). Tuukka Rask made 23 saves to win his fifth straight start.
[WATCH: All Bruins vs. Kings highlights]
"You've got to win in a lot of different ways if you want to be a good hockey club, so tonight it was not that we were behind, but it looked like the game was going to get away from us late there and a quick turn of events it goes our way," Bruins coach Bruce Cassidy said.
Alex Iafallo and Ilya Kovalchuk scored for the Kings (23-29-6), who have lost four straight (0-3-1). Jack Campbell made 20 saves starting in place of Jonathan Quick, who was out because of illness.
Video: BOS@LAK: DeBrusk stakes Bruins to early lead
Los Angeles is in last place in the Western Conference, eight points behind the Minnesota Wild for the second wild card into the Stanley Cup Playoffs.
McAvoy backhanded DeBrusk's pass at 18:47 for a 3-2 lead after Iafallo tied the game 2-2 on a rebound of Paul LaDue's shot at 15:37 of the third period.
"It wasn't the prettiest of goals but we didn't care at that point," DeBrusk said.
The Kings got a power play 23 seconds after Iafallo scored when Brad Marchand hooked Jeff Carter, but the Bruins did not allow a shot on goal.
"Very proud of how we played in the third," said Rask, who is 11-0-2 in his past 13 starts and has not lost since Dec. 23. "Even after they tied the game, a few minutes left and then we get a penalty, we did a great job with that penalty kill. It just shows how resilient our group is."
Kings center Anze Kopitar broke his stick in frustration after McAvoy scored his third goal, which Kopitar attributed to frustration with his execution on the go-ahead goal and on the power play that preceded it.
"With four minutes left and having a power play in a tie game we have to find a way to score," Kopitar said. "We didn't even get in the zone. That's embarrassing."
Patrice Bergeron made it 4-2 at 19:23.
The Bruins took a 1-0 lead at 5:31 of the first period when DeBrusk set an NHL career high with his 17th goal of the season.
Kovalchuk tied it 1-1 on the power play at 10:37 of the second period with a wrist shot from the left circle.
Marchand scored his fourth goal in the past five games to restore a 2-1 lead for Boston at 16:15 after Rask made an impressive save with the paddle of his stick to deny Iafallo at 14:55.
"I think that was the craziest two-pad stack save I've ever seen," DeBrusk said. "I had a front row view to it. It was actually my guy. There's a reason why he's been a Vezina winner, and he was the biggest reason why we won the game tonight, obviously. He was holding the fort down and it was impressive to watch."
Video: BOS@LAK: Rask stacks the pads to deny Iafallo
They said it
"Early in the year we weren't getting those breaks. They weren't going in. We weren't making the plays at key times, or if we were the goalies were making the big saves, so it's always been in the room but now we're seeing more of it simply because of the results." -- Bruins coach Bruce Cassidy
Video: BOS@LAK: Marchand goes top shelf after face-off win
"We got one power-play goal tonight, which was good, but I don't think we generated enough off of it. It just didn't seem like we ever really got set up or had anything going." -- Kings coach Willie Desjardins
Need to know
Bruins forward Karson Kuhlman played 9:47 in his NHL debut. … Kings forward Matt Roy played 11:32 in his NHL debut after being recalled from Ontario of the American Hockey League on Saturday. The Kings were without defensemen Alec Martinez (upper body), who will miss one-to-two weeks, and Sean Walker (upper body), who is day to day. … Bruins forward Peter Cehlarik sustained a lower-body injury in the third period. Cassidy did not know how serious it might be. … DeBrusk has six points (three goals, three assists) in a three-game point streak.
Bruins: At the San Jose Sharks on Monday (10 p.m. ET; NBCSN, SN, NESN, NHL.TV)
Kings: Host the Washington Capitals on Monday (10:30 p.m. ET; FS-W, NBCSWA, NHL.TV)
Video: McAvoy breaks tie with late goal, Bruins top Kings