BOWIE, Md. — An error by Bowie in the top of the eighth inning helped Portland tie Tuesday night’s game, but the Sea Dogs wanted more.

The day had been long, the heat oppressive and they really didn’t want to play extra innings.

The Sea Dogs quickly got their wish. Ray Chang, Luis Exposito and Anthony Rizzo followed the error with RBI hits to cap Portland’s rally for a 6-3 victory over the Baysox before 8,521 in an Eastern League game at Prince George’s Stadium.

Portland players awoke at 4:15 a.m. Tuesday to begin their trip to Bowie. They reached their hotel outside of town just before 9 a.m., and many took a nap.

The Sea Dogs then arrived at the ballpark during a humid afternoon with temperatures in the mid-90s and a heat index of around 100 degrees.

In other words, this was not the perfect night to play a 14-inning game.

“We really didn’t want to go into extra innings out there,” said Portland first baseman Nate Spears. “It was probably the hottest game we’ve played in all year.”

Portland (55-60) took a 2-0 lead when Spears homered off Bowie starter Steve Johnson in the first, but the Baysox came back with single runs in the second, third and sixth and held that 3-2 lead heading into the eighth.

Johnson gave up just two hits in his final six innings before Raul Rivero (1-1) took over in the eighth.

Ryan Khoury led off with a walk and moved to second on Chih-Hsien Chiang’s groundout. Then came a key play.

Che-Hsuan Lin grounded back to Rivero, who caught Khoury in a rundown between second and third. But Khoury kept the play alive long enough before getting tagged out to allow Lin to reach second.

That kept a runner in scoring position, which paid off moments later when Spears hit what looked like an inning-ending grounder to first baseman Joe Mahoney. But the ball slipped past him, and Lin scored easily to tie the game at 3.

Mahoney was charged with an error that turned the game around.

“I don’t know what happened,” Mahoney said. “I just missed it.”

Portland then took over. Chang broke the tie with an RBI single. Exposito made it 5-3 with his RBI double and Rizzo, the Eastern League player of the week, added a run-scoring single to finish off the four-run rally.

“We were able to take advantage of that error,” said Portland Manager Arnie Beyeler. “They went from winning the game right there to it being tied up, and then Ray got the hit (to break the tie).”

Lin and Spears gave the Sea Dogs a spark at the top of the lineup, each going 2 for 4 and scoring twice. They batted first and second, respectively, and had a big hand in both of Portland’s big innings.

“We capitalized on (the error),” Spears said. “It’s funny in baseball how things work out like that.”

Spears has hit safely in 20 of his last 21 games. He’s also reached in 95 of his 110 starts this season. His average improved to .275 while Lin stands at .274.

Sea Dogs right-hander Jeremy Kehrt entered the game with a 2-9 record, but he has been pitching better lately. He gave Portland six strong innings, giving up three runs on four hits. The run that gave Bowie (63-52) a 3-2 lead came on his wild pitch in the sixth.

Daniel Turpen (6-5) threw two perfect innings to get the win, and Jason Rice closed it in the ninth for his 12th save.