The Portland Pirates got offense from unexpected sources Tuesday night and snapped a three-game losing streak with a 3-2 victory against the Hartford Wolf Pack before a crowd of 2,523 at the Cross Insurance Arena.

Tyler Gaudet poked a loose puck inside the right post for his fifth goal of the season with less than four minutes left to snap a tie as the Pirates played at home for the first time since Jan. 23.

The Pirates, who went 4-4 on an extended trip, will play 16 of their final 25 games in Portland.

“We had a tough stretch on the road, and it’s good to come home and play in front of our fans,” said Phil Lane, who had his second goal of the season. “We’re usually pretty good at home.”

Portland’s three top forwards – Alexandre Bolduc, Lucas Lessio and Jordan Martinook – and its top two defensemen – Andrew Campbell and Brandon Gormley – are with the parent Arizona Coyotes. Others must score.

“With all of those guys up in Phoenix, we need other guys to step up,” Lane said. “It’s a different guy every night. If other people keep stepping up, we should be all right.”

The Pirates held a 34-12 edge in shots but they couldn’t turn that into goals.

“We’re just not scoring,” Coach Ray Edwards said. “We’re not finishing on the opportunities that we have. We have to keep going and hopefully some guys will get hot down the stretch.”

Still, the Pirates are 22-0 when scoring at least three goals.

“We knew we weren’t going to be the Edmonton Oilers of ’86,” Edwards said. “We knew we had to be a hard defending team and I thought tonight we defended. We got back to our identity.”

The Pirates led 2-1 after the first period.

The Wolf Pack opened the scoring at 11:15 on Ryan Haggerty’s 10th goal of the season, 33 seconds into a power play.

At 14:36, Brendan Shinnimin, back after a two-week stint with the Coyotes, scored his 10th goal on a blistering shot from the top of the slot 12 seconds after the Pirates began a two-man advantage.

With less than two minutes left in the period, Lane redirected defenseman Joel Hanley’s centering pass past goalie Yann Danis for his first goal in nearly three months.

“They say if you go to the front of the net, good things happen,” Lane said. “Hanley made a good play there, sliding the puck to me, and I just (bore) down and shot far side and it went in.”

Less than three minutes into the second priod, Tyler Brown finished off a three-on-one break with a shot from the slot for a 2-2 tie that stood after two periods.

NOTES: Hartford defenseman Michael Kostka, who spent two seasons with Portland when the Pirates were affiliated with the Buffalo Sabres, was in Hartford’s starting lineup. He leads Hartford’s defensemen with 19 assists. … Between them, Hartford forwards Chris and Ryan Bourque, the sons of NHL Hall of Fame defenseman Ray Bourque, have 28 goals and 38 assists. … In his third pro season, Shinnimin has one assist while playing 11 games for the Coyotes this season. … Veteran defenseman Chris Summers played his third game since being assigned to the Pirates by the Coyotes.