PORTLAND, Maine — The Portland Sea Dogs broke a tie with two runs in the seventh and downed the Binghamton Mets 6-4 in the opener of a three-game series, Monday night at Hadlock Field.

The Sea Dogs (65-37) held a 3-1 lead, heading into the seventh inning, but Brandon Nimmo changed that in a heartbeat. T.J. Rivera connected for a leadoff single against Mike McCarthy and Nimmo drove him home with a two-run homer off the video board in left-center.

Portland would respond and take the lead for good with a pair of its own in the bottom half of the seventh. Derrik Gibson connected for his fourth hit of the night to leadoff the inning and stole second against reliever Ryan Fraser.

Blake Swihart walked to put runners at the corners with nobody out. Ryan Lavarnway grounded to second for the first out, and Sean Coyle grounded to the pitcher, but Gibson was able to score and put the Sea Dogs in front 4-3. Dave Chester was next and struck out, but the third strike was a wild pitch and Swihart scored to make it 5-3.

Brian Burgamy hit a one-out solo home run in top of the eighth, cutting the Portland lead to 5-4, but the home team responded again in the next half inning. Stefan Welch took over for Lavarnway and tagged a two-out RBI single to right field, plating Ryan Dent and upping the lead back up to two.

Robby Scott came on for the ninth and earned his second save of the season. The lefty gave up a leadoff single, but induced a 4-6-3 double play and got Travis Taijeron to pop out to second, ending the game.

McCarthy (9-4) took home the win with his three innings of work. He allowed three runs, including the two homers, on three hits and struck out five. Fraser (2-2) got the loss, allowing two runs in two-thirds of an inning.

Portland began the scoring with a two-run third against Gabriel Ynoa of the Mets. Heiker Meneses began the frame with a single to left and Dent was hit by a pitch to fire up the rally. Gibson followed with a bunt single and Meneses scored on a throwing error by the first baseman Brian Burgamy, which made it 1-0.

Lavarnway plated the second run of the inning two batters later with an RBI groundout to short and Portland doubled the lead to 2-0.

Wilfredo Boscan started on the mound for the Dogs and tossed four scoreless innings to begin his outing. The B-Mets finally got to the righty for a run in the fifth and cut the Portland lead in half. Xorge Carrillo singled with one down and scored on Dilson Herrera’s double to the wall in right-center, making it 2-1.

Boscan and Ynoa would both be wiped out of their respective decisions, due to the late flurry of activity on the scoreboard. Boscan pitched the first five and gave up the one run on six hits, a walk and three strikeouts. Ynoa went 5 ⅔ innings and allowed three runs, two earned, on eight hits; he hit a batter and struck out three.