The Portland Sea Dogs looked ready to add to their recent spate of dramatic home wins when Sam Travis and Tim Robertson belted back-to-back home runs in the eighth inning Sunday to erase a three-run deficit against the Harrisburg Senators.

Travis hit a two-run homer off the scoreboard in left-center field, and on the next pitch Roberson cleared the scoreboard with a 436-foot blast that tied the game, 12-12.

“We’ve been playing better as of late, and once we tied it up there, in my head I thought for sure we were going to pull it off,” Roberson said.

Instead, it turned into an 11-inning, 16-12 loss for the Sea Dogs in a game that lasted more than four hours.

Harrisburg scored four runs in the top of the 11th, highlighted by Brian Goodwin’s leadoff homer down the right-field line off John Cornely.

“It’s been one of those seasons,” said Portland Manager Billy McMillon, whose team still owns the worst record in the Eastern League (40-69) despite improved play recently.

Eight of Portland’s last 12 home wins have been via a walk-off hit, and they had five walk-off wins in July.

On Sunday, the produced 18 hits. Roberson was 4 for 6 with three RBI, and Travis finished with four RBI.

The Senators pounded out 22 hits, including five home runs – all traveling more than 380 feet to right field with the benefit of a strong breeze.

Portland starter Luis Diaz was staked to leads of 5-1 after one inning but was removed in the third when Harrisburg scored three runs to tie the game at 6-6.

Portland took a 9-7 in the sixth on an RBI double by catcher Jordan Weems and a two-run single through a drawn-in infield by Travis.

Kyle Martin, the third of six Sea Dogs pitchers, retired the first two batters in the seventh. Then he walked the next two before giving up homers to Shawn Pleffner and Drew Vettlerson on consecutive pitches.

“We go up 9-7, two quick outs, and then two walks and two home runs. It’s just a punch to the gut,” McMillon said.

Martin had not allowed a homer this season. Vettlerson’s homer was his second of the game.

Isaac Ballou also homered for Harrisburg (53-56), which took the final three games of the four-game series.

Diaz (1-9, 5.59 ERA) has one win in his last 30 starts dating back to July 6, 2014, but he had gone at least six innings and allowed three or fewer runs in seven of his last eight starts. He gave up six runs on eight hits, two walks and a hit batter in 22/3 innings.

Senators starter Lucas Giolito, the top prospect in the Washington Nationals system according to Baseball America, gave up six runs in five innings.

With the bases loaded in the bottom of the first, Roberson’s shallow fly to center was lost in the sun by Goodwin and dropped for an RBI single. Oscar Tejeda followed with a grounder up the middle that caromed off Giolito’s leg for another RBI single. Henry Ramos double off the wall in right to drive home two runs, and Dustin Lawley, the only player in either team’s starting lineup to go without a hit, made it 5-1 with a run-scoring groundout.

NOTES: The Sea Dogs start a six-game road trip Tuesday, with stops in Erie and Akron. … Roberson extended his season-high hitting streak to 11 games. … Travis has a 10-game hitting streak. … Harrisburg leadoff hitter Wilmer Difo went 5 for 7 with a walk, three runs, two RBI and four steals. … Weems, called up from Class-A Salem on July 26, had been 0 for 11 as a Sea Dog until his RBI double.