HARTFORD, Conn. – The Portland Pirates had found every way imaginable to lose to the Connecticut Whale at the XL Center this season.

First it was in overtime, then in regulation and finally in a shootout last Sunday, when Portland rallied from two goals down.

But the Pirates did everything better than the Northeast Division leaders Friday night, got several fortunate bounces and 29 saves from Peter Mannino in a 4-1 victory that helped their precarious playoff position.

“We played solid,” Pirates Coach Ray Edwards said. “We’re a team that’s desperate and I thought we played with some desperation. We needed the points more than them.”

The Pirates (30-28-3-4) are in a wild chase for the last Eastern Conference playoff spots with nine teams. They moved into a tie for 10th with Worcester and Albany with 67 points, one behind Syracuse and Springfield, which each won Friday night.

Meanwhile, the Whale (33-22-5-5) had their lead in the Northeast Division reduced to three points over the Bridgeport Sound Tigers, who lost 3-2 in a shootout at Springfield. The Whale had been 14-5-1-0 since going 0-6-3-2 in January and were an AHL-best 19-6-2-4 at home, including 3-0 against the Pirates.

But the Pirates had the edge in every area, and Edwards was especially pleased with the defensive effort after a 5-4 shootout loss five days earlier.

“You knew they were going to push and we didn’t handle it every time, but we got through it and Mannino made a couple of good saves,” Edwards said.

“Sunday we were game, but there were so many momentum shifts that at times we looked really good and at times looked really tired. I didn’t mind our game because we outchanced them 16-14 and liked a lot of what we saw.

“The problem is that when you play three games in three days, there’s a lot of mental mistakes. Tonight I thought we were way better defensively and gave us way less chances. When we did, (Mannino) was there for us.”

The Pirates broke open the game with two goals 1:13 apart early in the second period. Brett Sterling gave the Pirates a 2-0 lead when he stole the puck from Jonathan Audy-Marchessault at the blue line, broke in and converted his own rebound at 7:09.

Moments later, Ethan Werek dug the puck away from Whale defenseman Mike Vernace behind the net, circled into the right circle and fired a shot that hit defenseman Pavel Valentenko’s elbow and went in at 8:22.

Alexandre Bolduc sealed the win when he picked off Kris Newbury’s drop pass in center ice and scored his third goal of the season on a breakaway.

The Whale ended Mannino’s shutout when Audy-Marchessault won a faceoff that Casey Wellman touched to Wade Redden, whose slap shot from the left point deflected off a stick and into the net with 8:05 left.

But the Pirates weren’t to be denied on this night.

“Tonight was one of our better efforts defensively,” Edwards said. “We didn’t give up a lot, were able to get a couple and play with the lead. Everyone talks about it, but it’s really hard chasing the game. You’re adjusting lines and trying to do stuff to get your guys going. No coach likes playing like that.”

Right wing Brett MacLean (36 points) and defenseman Nathan Oystrick (31), the Pirates’ third- and sixth-leading scorers, returned after missing one and five games, respectively, because of injuries. But the Pirates were without captain Dean Arsene (family matter).