BINGHAMTON, N.Y. — A pickoff that went wrong cost the Portland Sea Dogs their lead in the bottom of the seventh inning of Tuesday night’s Eastern League game.

Another errant throw allowed the Sea Dogs to bounce back a half-inning later for the winning run in a 4-2 victory over the Binghamton Mets.

Ryan Khoury reached on a two-out single up the middle in the eighth inning and went to second on a balk by Jack Egbert (0-1). Alex Hassan then singled to center and Khoury scored when center fielder Matt den Dekker’s throw sailed well over the head of catcher Kai Gronauer.

“That was a big two-out RBI, especially with what happened a half-inning earlier,” Sea Dogs Manager Kevin Boles said.

Den Dekker tied the game in the seventh after Kyle Fernandes appeared to have him picked off first. Den Dekker quickly broke for second and when first baseman Jon Hee bobbled the ball briefly, den Dekker was able to beat the throw to second base and later scored on a hit by Jordany Valdespin.

Sea Dogs pitchers combined to strike out 12. Chris Balcom-Miller, Fernandes and Blake Maxwell allowed nine hits, but stranded 10.

“Our pitchers did very well,” said catcher Tim Federowicz, who added an insurance solo home run in the ninth inning for his second extra-base hit. “They pounded the strike zone and did not allow too many walks.”

Coming off a 13-2 rout that was their worst loss of the season, the Sea Dogs jumped in front by turning leadoff doubles into runs in the first two innings.

“That’s baseball,” Federowicz said. “You can lose to a team by 10 runs one day and you can bounce back and win a 4-2 game the next.”

Khoury scored two of Portland’s runs. He opened the game with a double and scored on a single for Chih-Hsien Chiang’s league-leading 74th RBI.

The Sea Dogs scored again in the second inning following a double by Federowicz. After reaching third on a Mitch Dening sacrifice bunt, Federowicz scored on Oscar Tejada’s sacrifice fly.

Three of the first four Binghamton players had hits to start a wild bottom of the third inning, but the Mets produced just one run.

Den Dekker and Reese Havens started the inning with back-to-back singles.

The Sea Dogs just missed a triple play when Hee snagged Valdespin’s line drive, stepped on first base for the second out and threw to second base, where den Dekker was safe on a close play.

Brahiam Maldonado then bounced a ball over the left-center-field fence. Third-base umpire Joe Born originally ruled it a home run but Boles argued. Born consulted with the other umpires and switched the call to an RBI ground-rule double. Mets Manager Wally Backman came out to argue and was ejected.

Balcom-Miller then struck out Allan Dykstra for the second of three straight times to get out of the inning.

When Dykstra struck out a fourth straight time, against Fernandes in the eighth, he argued the called third strike and was also ejected.

Balcom-Miller allowed one run in 52/3 innings. Fernandes (1-4) struck out four in two innings to get the win with help from Maxwell’s 10th save.