BOSTON — If the Boston Bruins are going to make the playoffs for the first time in three seasons, the formula is simple.

“You’ve got to keep winning. If we keep doing this we don’t have to look at the standings and look for help elsewhere,” Bruins defenseman Torey Krug said after they beat the Florida Panthers 5-2 on Saturday.

David Krejci scored after a poor clearing attempt by Florida goaltender Reto Berra, helping them maintain an edge for a playoff spot heading into the final week of the regular season.

“I guess we were due one in this particularly game,” Boston interim coach Bruce Cassidy said. “You make your own breaks. I heard a few of our players saying it on the bench. We’ve often said that.”

Patrice Bergeron scored twice, Brad Marchand got his team-leading 39th goal and Noel Acciari also scored for the Bruins, who are one point behind Toronto and Ottawa for second place in the Atlantic Division. Boston now has a four-point lead over Tampa Bay for the Eastern Conference’s last wild-card spot, though the Lightning have a game in hand.

Jaromir Jagr recorded his 765th career goal and Thomas Vanek also scored for the Panthers, who lost for the 11th time in 15 games. They were eliminated from playoff contention earlier this week.

Krejci capitalized on the gaffe by Berra, moving Boston ahead 3-2 with 5:30 left in the second period. The goalie came far out of the crease, but his clearing pass from the right circle caromed off the boards directly to Krejci, who fired the puck into the empty net.

Tuukka Rask, who tied his career high with his seventh shutout this season in his last start, stopped 24 shots.

NOTES: Cassidy said backup Anton Khudobin would start Sunday. … Florida defenseman Keith Yandle played his 629th consecutive game, moving one behind Andy Hebenton for eighth on the NHL’s all-time list. … Boston forward Frank Vatrano missed his second straight with an undisclosed upper body injury. … Panthers forward Jussi Jokinen turned 34-years old on Saturday, and teammate Reilly Smith 26. … Interesting hit: Forty-year-old Chara knocked down 45-year-old Jagr. … Panthers forward Shawn Thornton, a member of Boston’s 2011 Cup winning team, played his last game in TD Garden. He’s retiring after the season and has a job waiting for him in Florida’s front office. He was given the game’s Third Star. “That’s probably the closest I’ve been to chocking up in a bit,” he said of an ovation after the game. “I appreciate that.”