BRIDGEPORT, Conn. – They gave up another late power-play goal, but the Portland Pirates made sure that one wouldn’t make a difference Wednesday.

A three-goal second period gave the Pirates momentum, and two more goals in the third gave them a 5-3 win over the Bridgeport Sound Tigers at the Arena at Harbor Yard.

“We were all upset when that puck went in, even though we were two goals ahead,” Portland Coach Kevin Dineen said. “It’s something we want to have a lot of pride in.”

The Pirates had lost three games in a row, all on power-play goals, two of them in overtime and one with under four seconds remaining in regulation.

“It’s been a tough go for us,” Dineen said. “I’ve liked a lot of things about our game, other than the results hadn’t been there.”

The whole lineup contributed Wednesday to make sure the late goal, banked in by Bridgeport defenseman Mark Wotton, didn’t matter. Each of the Pirates’ starting forward lines included one player who scored.

“There’s nothing more a coach could ask more than having the scoring spread around,” Dineen said. “Coming out of different areas: The power play scored some goals tonight, and different guys put the puck in.”

Justin Bowers, on his second professional tryout contract with Portland since the start of December, scored the go-ahead goal in the second period. His cross-ice pass set up T.J. Brennan’s goal that proved to be the winner.

He came down the slot to take Jacob Lagace’s pass and rifle it past Mikko Koskinen for a 3-2 lead.

Bridgeport got out of the first period with a 1-0 lead. Mark Katic’s right-point shot, headed beyond the net to Jhonas Enroth’s right, hit Tim Conboy’s leg and caromed back past Enroth.

It didn’t hold Portland back. The Pirates tied it on a power play after Wotton was called for running into Enroth.

Paul Byron had his shot from the right-circle dot blocked, but he collected it and flipped it past Koskinen.

The Pirates took the lead 1:32 later. Maxime Legault scored his fifth goal on the rush, using a Bridgeport player as a screen.

After Brandon Svendsen tied it, the Pirates picked off an errant Bridgeport clearing attempt that led to Bowers’ goal.

Mark Mancari scored his team-high 15th goal with 6:02 remaining on a power play.

“To go out and get a game in here,” Dineen said, “where we’ve historically had tough games, it’s a really good feeling for us.”