Aneury Tavarez knocked in the winning run in the 10th inning Tuesday night for a 3-2 Portland Sea Dogs win over the Binghamton Rumble Ponies at Hadlock Field.

Tzu-Wei Lin led off the 10th with a double down the left-field line and Danny Mars sacrificed him to third. Tavarez then hit a dribbler toward the mound. Pitcher Corey Taylor charged the ball and threw home but Lin slid under the tag.

Portland remained unbeaten at 5-0. The Ponies are 2-3.

Mike Olt homered for Portland, swatting a Mickey Jannis knuckleball over the left-field wall in the fourth inning for a 2-1 lead.

That looked to be the winner until Williams Jerez gave up a run in the ninth on a single, two walks and a groundout RBI.

Portland right-hander Kevin McAvoy allowed two hits and one run over six innings in his first start of the season.

Jannis pitched well for Binghamton, allowing four hits and two runs (one earned) over five innings.

The game was 1-1 before either team had a hit. McAvoy, a fourth-round draft pick in 2014, got in trouble in the second with a walk, two wild pitches and another walk. A run scored on a fielder’s choice.

Portland came back in the bottom of the inning. Nick Longhi walked, then reached third base when Jordan Procyshen’s grounder was misplayed by second baseman L.J. Mazzilli. With runners on first and third, Procyshen broke for second base. He got caught in a rundown, and Longhi raced home. It was the second time this season the Sea Dogs scored on such a play.

Olt put Portland ahead 2-1 with his first home run of the season.

McAvoy got in a sixth-inning jam when Champ Stuart led off with a single, stole second and reached third on a groundout. Portland brought its infield in and Luis Guillorme grounded out to Lin, the shortstop. McAvoy got another groundout to Lin to end the inning.

Luis Ysla relieved in the seventh, loading the bases with one out on a single and two walks. He escaped with strikeouts on fastballs of 95 and 96 mph.

NOTES: The announced paid attendance was 2,826. … Rafael Devers (1 for 4) has at least one hit in the four games he’s played. … Tavarez had two singles, extending his hitting streak to 16 games dating to last year. … Sea Dogs designated hitter Mike Olt and Binghamton’s L.J. Mazzilli were teammates at the University of Connecticut. … Jannis was a Cal State-Bakersfield teammate of former Sea Dogs pitcher Mike McCarthy. … In Triple-A Pawtucket, Blake Swihart homered in the first inning. … The PawSox said pitcher Brian Johnson, who was hit in the head by a line drive Saturday, will make his next scheduled start Thursday. … Former Sea Dogs catcher Tim Federowicz was called up to the San Francisco Giants to replace the injured Buster Posey.