HARRISBURG, Pa. — The Portland Sea Dogs dug themselves out of a two-run hole Wednesday night by scoring three runs in the top of the seventh, and Carson Blair finished with another homer and three RBI in a 5-3 victory against the Harrisburg Senators at Metro Bank Park.

Right-hander Justin Haley (1-2) scattered seven hits, struck out eight and allowed three runs in 6 1/3 innings to earn his first Double-A victory.

A night after clinching their first playoff berth since 2008, the Sea Dogs (80-50) moved to a season-best 30 games above .500 for the fifth time in 2014. Right-hander Wilfredo Boscan pitched 2 2/3 innings of scoreless relief for his first save of the season.

With its fifth consecutive win, Portland maintained its two-game lead over Binghamton in the Eastern League’s Eastern Division. The visiting Mets (78-52) beat the Erie SeaWolves 8-5. Meanwhile, swooning Harrisburg (49-80) lost its season-high seventh straight and fell to 2-15 in its last 17.

“We’re battling every day,” said Sea Dogs Manager Billy McMillon. “Haley did a really good job keeping us in the ballgame. He didn’t get flustered when we got down and was able to get the win. And for Boscan to come in (and) pitch as effectively as he did at the end, you can’t say enough about both of those performances tonight.”

With Portland trailing 3-1, Blair’s two-run double in the seventh tied the game, and Shannon Wilkerson’s sacrifice fly put the Dogs ahead for the first time, 4-3. Blair added an insurance run in the ninth with a booming homer to left, his second homer in as many nights.

“I haven’t been here the whole season, but these guys never think they’re out of a game,” Blair said. “It doesn’t matter how much we’re down, we always get right back at it. It’s a good feeling to be part of such a winning team. I’m excited to contribute what I can.”

Caleb Ramsey’s RBI single staked the Senators to a 1-0 lead in the third inning. Harrisburg left-hander Felipe Rivero quieted Portland’s bats during his five-inning stint. After Wilkerson led off the game with a triple, the Sea Dogs didn’t have another hit off Rivero, who struck out six and walked two before giving way to right-hander Colin Bates (1-3) in the top of the sixth.

Heiker Meneses, the first batter Bates faced, singled to left. Wilkerson’s sacrifice bunt moved him to second, and Meneses slid in safely to score Portland’s first run – just beating Ricky Hague’s throw to the plate – when Ryan Dent followed with a single to left. Dent was thrown out trying to steal second, and Sean Coyle popped out to end the inning. Coyle was activated off the disabled list earlier in the day after missing 10 games with a right ankle injury.

The Senators responded in their half of the sixth. With Cutter Dykstra at first and one out, Kevin Keyes jumped on the first pitch from Haley and smoked a two-run homer into the right-field bleachers for a 3-1 lead.

Portland had a response in the seventh as Keury De La Cruz led off with a single to left and Michael Almanzar legged out an infield hit on a chopper to third. Blair made it three hits in a row with a line-drive double into the gap in left-center field, scoring both runners for a 3-3 tie.

After David Chester grounded out and Stefan Welch was walked intentionally, right-hander Tyler Herron relieved Bates and Meneses greeted him with a single, loading the bases. Wilkerson’s sacrifice fly to center drove in Blair with the go-ahead run.