It had the looks of being a terrible evening for the Portland Sea Dogs.

Isaac Ballou hit a grand slam off Portland starter Keith Couch in the fourth inning for a 7-0 Harrisburg Senators lead.

And Harrisburg was starting Lucas Giolito, considered the best right-handed pitching prospect in the minor leagues. Giolito had allowed more than two earned runs only once this season.

But the Sea Dogs did rally against the ace, closing to 7-6, before falling short in a 9-6 loss on Wednesday night before 3,823 at Hadlock Field.

Top Red Sox prospect Yoan Moncada, playing his second game for the Sea Dogs, went 3 for 5 with a double, two RBI and two runs. In two games, he has four hits, three RBI and three runs.

“He has a very good swing and a lot of athleticism,” Sea Dogs Manager Carlos Febles said. “I like how he plays the game. He plays the game free. He has a lot of tools.”

Nate Freiman added two RBI singles.

Giolito did not get a decision, going only 42/3 innings, allowing five earned runs on seven hits and four walks. He struck out three. His ERA rose to 3.17.

“He was pulling off on his breaking ball, so we could pretty much take it,” Portland first baseman Cody Decker said. “His fastball had some late life on it. As long as he throws strikes, he’s going to be really effective.”

Couch (4-3) saw his ERA jump to 4.81 after giving up seven runs in 32/3 innings.

Couch had been cruising through two innings, needing only 16 pitches.

But he threw 29 pitches in the third inning, allowing three runs and four hits, including Ballou’s two-run double to left – for two of his seven RBI.

In the fourth, Couch faced Ballou again, with the bases loaded and two outs. On a 3-1 count, Couch delivered an 88 mph fastball and Ballou crushed it to right field for his slam, chasing Couch.

Mike McCarthy and Ben Taylor followed with scoreless relief – McCarthy for 11/3 innings, followed by Taylor’s Double-A debut (two innings, one hit, one walk, two strikeouts).

Portland’s rally began with a two-run fourth. Moncada led off with a double down the right-field line. After a walk and two outs, Freiman and Aneury Tavarez stroked RBI singles.

In the fifth, Portland put together three hits and two walks for three runs. Decker’s hustle to avoid a double play – sliding safely into first base for a fielder’s choice RBI – kept the inning alive.

In the sixth, Moncada singled in Tzu-Wei Lin, closing the gap to 7-6.

Harrisburg got two unearned insurance runs in the eighth off Luis Ysla, on two singles and a bunt and throwing error by catcher Jake Romanski, and a Ballou sacrifice fly.

NOTES: Thursday night’s game at Hadlock begins at 6 p.m. because fireworks will follow the game. … Ty Buttrey made his fifth relief appearance since joining the bullpen, pitching a scoreless ninth (two walks, two strikeouts). In 91/3 relief innings, Buttrey has a 0.97 ERA, nine strikeouts and six walks. … Tavarez was 1 for 3 with an eight-pitch walk in the fifth. He has hit safely in 11 of his last 12 games. … Giolito, a first-round draft pick in 2012, was making his second start against Portland. His May 25 effort was also a non-decision (seven innings, four hits, one run).