MANCHESTER, N.H. — Jason Leblebijian scored the winning run when Christian Lopes beat out a grounder to first base with two outs in the bottom of the ninth inning to lift the New Hampshire Fisher Cats to a 6-5 victory over the Portland Sea Dogs on Tuesday night.

Leblebijian led off the inning with a walk by Austin Maddox (2-1), who entered the game to start the ninth inning. Leblebijian moved to second on a bunt and advanced to third on Shane Optiz’s fly ball to the right-field warning track.

After falling behind 4-0, the Sea Dogs rallied with five runs in the top of the fifth inning. After two quick outs to start the inning, Yoan Moncada walked and scored on a triple by Mauricio Dubon. Andrew Benintendi followed with a two-run homer.

After a single by Nate Freiman, Sean Coyle closed out the scoring with a two-run homer to give Portland a 5-4 lead.

New Hampshire tied the game in the bottom of the seventh inning on a leadoff homer by Derek Loveless.

It was the second homer of the game for Loveless, who also hit a solo homer in the bottom of the second inning.

The Fisher Cats also got an RBI double from Rowdy Tellez and an RBI single from Ryan Lavarnway as they scored single runs in each of the first four innings.

Benintendi, Coyle and Dubon finished with two hits apiece for the Sea Dogs and Moncada went 1 for 3 with a walk.

New Hampshire got two hits apiece from Loveless and Lopes.