HARTFORD, Conn. — The Portland Pirates won for the first time this season, taking advantage of penalties to power past the Hartford Wolf Pack 4-2 on Wednesday night at the XL Center.

Portland is 1-3-0-1. Hartford is 5-1-0-1.

The Pirates, after failing to score on either of two first-period power plays, rebounded by scoring on 3 of 5 second-period advantages.

Kyle Hagel gave Portland a 2-0 lead two minutes into the second period, scoring his power-play goal from Daine Todd and Brandon Gormley. Chris Brown followed with the second power-play goal of the period, scoring from Jordan Martinook and Gormley at 8:55.

Hartford’s Kyle Jean narrowed the margin to 3-1 with 2:28 left in the period, but Andy Miele retaliated with a five-on-four goal from Brown and Todd with 43 seconds to go.

The Wolf Pack pulled within 4-2 on a power play scored by Danny Kristo six minutes into the third period.

The Pirates took a 1-0 lead in the first period when Miele slipped the puck past Hartford goalie Jason Missiaen at 14:06. Todd and Phil Lane assisted on the goal.

Portland’s Mark Visentin was the winning goalie, stopping 18 of 20 shots. Missiaen had 26 saves.

The Pirates play at Albany on Saturday night.