ST. JOHN’S, Newfoundland — The Portland Pirates needed a win, not the St. John’s IceCaps.

But you would never have known that.

“They wanted it more than us, which is tough to swallow because we’re the team that’s supposed to be desperate,” said Pirates Coach Ray Edwards after Tuesday’s 5-2 loss. “And that’s a bit shocking, because we had been playing well and I felt we were ready to go.”

The IceCaps already have clinched first in the AHL’s Atlantic Division. The Pirates are struggling to reach the final playoff spot in the Eastern Conference – they are three points out with five games remaining.

“You have your meetings going into the game and you read your group and before the puck dropped, I felt the guys were ready,” Edwards said. “But we were flat and slow and we were outcompeted.

“Given the time of the season and the situation (we’re in), I was shocked.”

Former Maine Black Bears defenseman Will O’Neill scored his first pro goal for St. John’s, as did tryout forward Danny Dries.

Aaron Gagnon, John Albert and Zach Redmond also scored for St. John’s (41-21-5-3), which is guaranteed a top-three seed in the playoffs.

Marc-Antoine Pouliot and Brett Sterling scored for Portland (32-30-4-5), which plays at St. John’s again tonight.

Gagnon and Albert scored in the first 4:41 to get the IceCaps off to a good start.

“Give them credit. They came out hard and fast and forced us into situations and we just didn’t respond,” said Edwards. “They beat us in the race to pucks. We didn’t defend our net. We just didn’t play very well.”

Pirates goalie Peter Mannino was pulled two minutes into the second period after O’Neill and Dries scored 15 seconds apart to make it 4-1. At that point, Mannino had faced nearly a shot a minute, 21.

His replacement, Justin Pogge, was almost as busy the rest of the way, stopping 26 of 27 shots.

David Aebischer made 31 saves for St. John’s, his best work coming in the last half of the game. But Portland’s only goal after the first period was on the power play by Sterling 4:46 into the third.

It’s almost impossible for the Pirates not to engage in scoreboard watching, but Edwards has been trying to keep his players’ main focus on “the next game.”

That next game comes soon and a chance for revenge for the Pirates.

“We obviously came in here and wanted to win two, but now we have to split. We have to,” said Edwards, who does have options for lineup changes tonight but seemed more inclined to stay with those that played Tuesday.

“The group that we had tonight has to play better. It’s that simple. They know that. You think they’re not upset? They’re upset. They’re disappointed in there. They’re shocked, too.

“They’re pros and they’re good people. They want to win and they want to prove that.”

After tonight, the Pirates are home for the next three games before the season finale at Providence on April 14.