Jaromir Jagr has seen it all in his 1,670 regular season and playoff games in the NHL.

But he couldn’t remember a performance as gritty as the one the Devils gave Friday night in order to stay in the race for a playoff spot.

Down to only seven forwards late in the third period, the Devils got a goal from Ryan Carter with 4:54 remaining and held on for a 2-1 victory over the Washington Capitals at Prudential Center.

Coupled with the Columbus Blue Jackets’ loss to the Chicago Blachawks, the Devils pulled to within three points of a playoff spot with five games remaining. They will face the Carolina Hurricanes Saturday night in Raleigh, N.C.

“I’m happy the way we played the last two periods. That was a team win,” an emotional Jagr said. “Everybody gave everything we could. We had a short bench. That’s probably the toughest and best win we’ve had so far, the way I look at it.

“We had to win, guys went down (with injures). We had a lot of new guys. I’m proud of our team today. I was negative the last three or four games, but I’m very positive today. We showed up as a team.”

After dressing only 11 forwards, the Devils found themselves in crisis mode in the third period.

They lost Patrik Elias with a possible head injury at 11:47 of the first period when he was checked into the boards by Tom Wilson. Adam Henrique suffered an undisclosed injury in the second and took only one shift early in the final period. And Jacob Josefson limped off the ice three minutes into the third period with what looked like a left foot injury.

Damien Brunner went to the dressing room with 5:33 left because his skates needed sharpening and he was gone for four minutes, leaving the Devils with seven forwards.

That forced coach Pete DeBoer to use a line with Eric Gelinas at left wing, Carter at center and Mike Sislo at right wing.

“I think there was a lot of heavy breathing on the bench. And listening. We were playing different positions,” Carter said. “We had three centermen go down. We had guys playing positions maybe a little foreign to them and getting shuffled around. So there was a high level of focus on the bench.”

Defenseman Marek Zidlicky made the pass that gave Carter a chance from the edge of the slot. He beat goalie Joroslav Halak for his sixth goal of the season, which proved to be the winner.

“Zid made a nice play through the neutral ice to get it over the guy and give it to me with a little time and space there,” Carter said. “I saw the weak side D was coming to me so all I wanted to do was pull it close to my body and get it around his stick.”

It was an improbable line that kept the team’s hopes alive.

“That’s surprising. But those guys work every night,” DeBoer said. “Ryan Carter’s been a warrior here for the three years I’ve been here with him.”

Goalie Cory Schneider robbed Marcus Johansson from in close with 2:28 left as the Devils held on.