Jonathan Roof had not swung a bat in a game since Saturday in New Hampshire.

One swing was all he needed Tuesday night.

Inserted as a pinch runner in the seventh inning of a tie game, Roof lofted the first pitch he saw in the bottom of the ninth for a winning double off the wall in left field.

Blake Swihart raced home from first base to give the Portland Sea Dogs a 4-3 Eastern League victory over the Binghamton Mets before a crowd of 5,578 at Hadlock Field.

“When you’re coming off the bench like that, you try to be aggressive to eliminate the off-speed (stuff),” said Roof, de-shirted by teammates who raced from the dugout to greet him on the outer lip of the infield. “I didn’t really want to face his slider. I saw fastball and got a good pitch to hit.”

Jon Velasquez (4-3) had escaped a bases-loaded situation in the seventh when he came on in relief as Binghamton’s third pitcher. Swihart started the winning rally with a one-out double and never hesitated on Roof’s high fly, which struck the wall above the leaping attempt of Binghamton outfielder Kyle Johnson.

“If he would have made a catch, all of us would have had egg on our face,” said Sea Dogs Manager Billy McMillon, who was coaching third base. “I was screaming to him and waving for Swihart to go.”

It was the fifth walk-off victory of the season for the Sea Dogs, who have won two in a row over their closest pursuers in the EL East and extended their lead to 51/2 games. Portland is 9-1 this month at Hadlock Field.

“The crowd here is just tremendous to play in front of,” Roof said. “There was a little bad taste in our mouth from (the Mets) sweeping us. We wanted to go out and prove to them that we’re not just going to go down easy, like we did at their place (earlier this month).”

The game had been tied at 3 since the fifth, when solo home runs by Binghamton’s Travis Taijeron and Dilson Herrera erased a 3-1 Portland lead.

The Sea Dogs had managed only a Michael Almanzar bloop double off Binghamton starter Rainy Lara the first time through the batting order.

It was rehabbing Ryan Lavarnway who got the ball rolling. He drove a full-count fastball into the Sea Dogs’ bullpen in right field for a home run and a 1-1 tie. Sean Coyle singled and tried to take third on a two-out Stefan Welch single to right. Taijeron’s throw beat Coyle to third, but Binghamton’s Dustin Lawley saw the ball pop out of his mitt, allowing the inning to continue, with Welch hustling to second.

Both runners scored on Shannon Wilkerson’s flare to left.

Sea Dogs starter Luis Diaz tossed seven innings and 101 pitches, perhaps only three of which he’d like back. A bases-loaded wild pitch in the third allowed Taijeron to score the game’s first run. A fastball to Taijeron to open the fifth landed in the trees in left center. A two-out change-up to Herrera wound up in the net atop the left field wall.

Binghamton threatened to take the lead in the eighth against reliever Pete Ruiz (2-0). After a one-out triple by Herrera on which Hissey crashed into the wall in left, Ruiz issued an intentional walk to set up a potential double play.

A pitch in the dirt resulted in a strikeout. The ball caromed to the grass in foul ground, where catcher Swihart scrambled for a quick toss to Ruiz, arriving at the plate almost simultaneously with Herrera attempting to score on a headfirst slide.

The call was out. Herrera slammed his helmet to the ground and was ejected.

NOTES: Lavarnway, on the mend from surgery to his left wrist, grounded out twice and walked in addition to his home run before departing in the seventh.

He is scheduled to play again Wednesday, take Thursday off and join Triple-A Pawtucket on Friday in Syracuse.