In the course of one inning Sunday, Portland Sea Dogs second baseman Wendell Rijo went from goat to hero.

Rijo lined a two-out, two-run double into the gap in left-center in the 10th inning to lift the Sea Dogs to a 7-6 win over the Reading Fightin Phils at Hadlock Field.

Rijo’s winning hit came after he dropped the ball while trying to turn an inning-ending double play in the top of the inning. The Phils went on to take a 6-5 lead when Christian Marrero drew a bases-loaded walk.

“Rijo made an error in the top of the inning that hurt us, and then came up and won the game for us,” Portland Manager Carlos Febles said. “He redeemed himself at the plate.”

Rijo reached base in all six of his at-bats, including once on an error, and raised his batting average 50 points to .219 by becoming the first Sea Dog to collect four hits in a game this season.

“I was ready to put my team in the best position I could,” he said. “I just (tried) to stay comfortable and stay mentally in the game. Good things happen.”

Ali Solis started the winning rally with a one-out walk, and center fielder Henry Ramos kept it going with a two-out single.

It was the second consecutive win for the Sea Dogs, who snapped an eight-game losing streak Saturday with a 6-3 win over Reading.

“Both teams did a lot of good things and made some bad mistakes,” Febles said, “but at the end we were able to finish on top.”

The Sea Dogs rallied for two runs in the bottom of the ninth to send the game into an extra inning.

Ramos started the rally when he hustled to second base after striking out while swinging at a wild pitch. Ramos scored on Angelo Mora’s two-base throwing error following Rijo’s high chopper to shortstop. Rijo moved to third on Bryce Brentz’ flyball to right and made it 5-5 by scoring on Jordan Weems’ sacrifice fly to center.

In the top of the 10th, the Phils loaded the bases against Nik Turley on a one-out walk to Aaron Brown, Rijo’s error after a Harold Martinez grounder, and Roman Quinn’s infield hit. Turley walked Marrero to force home the go-ahead run before Simon Mercedes (1-2) came in to get the final two outs.

“I tried to make (the play) quick,” Rijo said of his error. “When you start to speed up, things don’t go your way. In double plays, you have to make sure of one (out), and I just forgot that part.”

The Sea Dogs held a 3-1 lead after one inning.

Two outs into the game, Reading first baseman Rhys Hoskins launched his fifth home run of the season, over the left-field wall.

Portland took advantage of defensive gaffes and starting pitcher Ricardo Pinto’s wildness to respond with three runs in the bottom of the first.

With one out, Rijo’s blooper into shallow right fell between three fielders. After Rijo moved to second on an errant pickoff throw, Tim Roberson walked. Rijo scored when Hoskins let a ground ball by Aneury Tavarez scoot under his glove into right field. A walk to Rainel Rosario loaded the bases for Jordan Betts, who singled sharply through the left side of the infield to drive in two runs.

The Fightin Phils took a 4-3 lead in the second, scoring three runs on a walk, Harold Martinez’s double deep into the gap in left-center, Quinn’s triple to center, and a wild pitch by Portland starting pitcher Kevin McAvoy, who last just 3 1/3 innings.

Reading added a run off reliever Mitch Atkins when Jake Fox led off the fifth with a double and scored on a single by Dylan Cozens.