This season hasn’t gone anywhere according to the plan the Washington Capitals had at the outset five months ago. But all the detours, peaks and valleys they traversed didn’t prevent the Capitals from clinching a playoff berth when their postseason hopes were on the line.

Washington captured a 4-2 victory over the Florida Panthers on Thursday night at Verizon Center that, combined with the Buffalo Sabres’ 2-1 loss to Philadelphia, punched its ticket to the Stanley Cup playoffs for the fifth consecutive season.

They might have made the route a little more difficult than in years past — the trend continued Thursday night, with starting goaltender Michal Neuvirth leaving the game in the second period with an apparent leg injury. But all that matters is the destination.

“Not everything’s going to go your way the entire year,” said Brooks Laich, whose tally in the second period proved to be the game-winner. “I came to camp expecting to be a scoring winger and end up being an assignment center for most of the season. Things are going to change through the course of the season. You have to accept that. You accept the highs, you accept the lows. . . . We’re just a group of guys that enjoys playing together and we’ll ride this wave.”

In an unusual twist, in addition to helping the Capitals seal their trip to the postseason, Buffalo’s loss also secured Florida’s first playoff berth since the 1999-2000 campaign.

With one game left to play in the regular season it still remains to be determined where Washington (41-32-8, 90 points) will finish in the Eastern Conference. Washington resides in eighth place but would capture the Southeast Division title and catapult to third if they beat the New York Rangers on Saturday and the Panthers (37-26-18, 92 points) lose in regulation in their season finale against Carolina. The seventh seed is also a possibility, as Ottawa (41-30-10, 92 points) still needs one more point to clinch that spot.

Where they wind up isn’t at the forefront of the Capitals’ minds moving forward though.

“It doesn’t matter which position you are,” Alex Ovechkin said. “It doesn’t matter what’s the standings right now. It’s most important thing to win. Next game most important thing right now for us — it’s ready for the playoffs.”

Although the Capitals never trailed, Thursday’s victory didn’t come without another hurdle. Neuvirth was forced from the game 5 minutes 39 seconds into the second period after Panthers forward Marco Sturm fell on his left leg. Neuvirth, who stopped all 13 shots he faced, needed to be carried down the tunnel and is formally listed as day-to-day with a lower-body injury.

Before Neuvirth’s departure resulted in action for Braden Holtby, who stopped 12 of 14 shots he faced, the Capitals had already jumped to a 1-0 lead. Jay Beagle beat former Capitals netminder Jose Theodore (19 saves) from the slot to put Washington ahead less than six minutes into the first period as he and the rest of the checking line, Matt Hendricks and Troy Brouwer, fueled a fast start for the home team.

Just over two minutes after Holtby entered the game, Ovechkin scored on a rebound of a Marcus Johansson shot to put the Capitals ahead 2-0. Then Laich buried a shot high past Theodore’s glove side for a commanding 3-0 Washington advantage with 9:49 gone in the second.

“You could see that we were intense, that we wanted the game, and we were gonna do what it takes to win,” Hunter said. “They sacrificed to win, and that’s what you need to win. We’ve got a lot of character in the room, and that’s how we won tonight — through the character of the guys.”

The Panthers, searching for at least a point in an attempt to secure the division crown, pushed back with goals by Mikael Samuelsson and Ed Jovanovski. Washington never faltered, though, finding the elusive balance between protecting a lead and ensuring that they didn’t spend the whole third period in their own end.

As the score of the Sabres’ loss flashed on the screen the Verizon Center crowd roared, and on the next shift Alexander Semin roofed a backhander for an insurance goal.

“It’s been a battle,” Coach Dale Hunter said. “Through [Nicklas Backstrom’s] injuries and stuff, guys battled through it. [Mike Green] being out too at different times, and now goalies being down — a lot of controversy, but you know, it made people stronger and made other people stand up. . . . That’s what you need.”