BOSTON — The Boston Bruins clinched the top spot in the Eastern Conference with a 5-2 victory over Philadelphia that further damaged the Flyers’ playoff hopes.

Defenseman Johnny Boychuk and winger Milan Lucic scored third-period goals 31 seconds apart as the Bruins ended a two-game losing streak and extended the Flyers’ losing streak to four games, two against Boston.

The Bruins, who have four games left, three on the road, recaptured the No. 1 spot in the overall standings. They took a two-point lead over St. Louis, with the Blues still playing.

The Flyers, 1-4-2 in their last seven games, were in the third-place automatic playoff spot in the Metropolitan Division, but Columbus had two games in hand.

Philadelphia also is in danger of failing to get one of the two wild card spots.

Lucic scored his 23rd and 24th goals of the season, and had an assist, and center David Krejci scored his 17th goal and also had an assist.

Right winger Loui Eriksson, filling in for the injured Jarome Iginla on the right side of the line, finished with four assists and had seven shots on goal.

The game was tied, 2-2, when Patrice Bergeron won an offensive-zone faceoff back to Boychuk, who blasted a slap shot past Ray Emery, Boychuk’s fifth goal of the season coming with 6:06.

It was quickly followed by Lucic’s second.

Left winger Chris Kelly added an empty netter with 20.7 seconds left, his ninth goal of the season, as the Bruins avoided their first three-game losing streak of the season.

Tuukka Rask made 24 saves in the Boston goal, while Emery played a strong game, with 37 saves.

The assist on Boychuk’s winner extended Bergeron’s point streak to a career-high 11 games.

Right winger Wayne Simmonds (his 17th) and left winger Jay Rosehill (No. 2 in 31 games) scored for the Flyers.

The Bruins scored the only goal of the first period when Emery made two saves on Ericksson in tight before Krejci drew the second rebound to his stick and scored into the unguarded net at 15:56.

Things were calm until the teams combined for three goals in a 1:24 span of the second period.

First, the Flyers, threatening to be shut out for a third straight game, tied the game on the power play to end their shutout streak at 165:01.

Simmonds, stationed in his usual spot right near the goal, picked up a rebound of a shot by defenseman Mark Streit off the backboards and, after Rask missed it on a dive, slid the puck in with 5:24 left in the period.

It took the Bruins 19 seconds to answer, with Krejci carrying the puck around the net and finding Lucic in the high slot. Lucic’s one-time slapper beat Emery.

But the Flyers got that one back when Rosehill got behind Boston’s defense of Torey Krug and ex-Flyer Andrej Meszaros and stuffed the puck in for his first goal in 22 games.

Earlier, Rosehill won a fight with Boston right winger Shawn Thornton, so he fell an assist sky of a Gordie Howe Hat Trick.

NOTES: Bruins RW Jarome Iginla missed his second game in the last three because of a lower body injury, while D Kevan Miller was also out with an undisclosed injury. … C Carl Soderberg returned to the Boston lineup after missing Thursday’s game for the birth of his first child. … Flyers RW Steve Downie missed his seventh straight game because of a head injury. … Flyers coach Craig Berube said G Steve Mason will start at home against the Buffalo Sabres on Sunday after Ray Emery played on Saturday. … The Bruins travel to play at Minnesota on Tuesday and Winnipeg on Thursday. … Bruins RW Reilly Smith was named the winner of the Seventh Player Award, voted by the fans to the Bruin who most exceeded expectations. He has one goal in the last 26 games. … Former Bruin Derek Sanderson dropped the first puck as the team capped the commemoration of its 90th season.