The Devils were 66 seconds away from losing their seventh straight game. But Patrik Elias, determined to get his team back on the winning track, scored the game-tying goal and the eventual shootout winner in the Devils’ 3-2 win last night over the Sabres at the Prudential Center in Newark.

“We had two or three unbelievable opportunities there and [Sabres goalie Jhonas Enroth] made great saves,” Elias said. “I’m glad we stuck with it and got the two big goals at the end there.”

Trailing 2-0, with 6:30 left in the contest, Adam Henrique got the Devils on the board with a power-play goal, just as he did late in the third period of Tuesday’s loss to the Lightning. The difference this time was his team completed the comeback, as Elias scored the tying goal seconds after goaltender Johan Hedberg was pulled for an extra attacker.

“It’s a nice one to get,” Henrique said. “[Hedberg] played great for us again. He was great in the shootout. Made some big saves at key times. Now we’ll keep moving forward from here.”

David Clarkson agreed, saying Hedberg received unfair criticism after the Devils had lost their previous six games with him in the net in place of the injured Martin Brodeur.

“[Hedberg] is the heart and soul of this team,” Clarkson said. “He is a guy in my opinion that every year is one of the hardest working and he is a leader in this room. We’ve got to turn this thing around for this team, but for him as well. He deserves it.”

Hedberg looked much sharper last night after being pulled in the second period of Tuesday’s 5-2 loss to Tampa Bay. It was his first win since Feb. 10.