The Portland Sea Dogs jumped on Yankees pitching prospect Dillon Tate for six runs in 11/3 innings.

But after leading 6-0, the Sea Dogs watched the Trenton Thunder walk again and again.

Portland pitchers allowed 12 walks, and Trenton rallied for a 9-8 victory Wednesday night at Hadlock Field.

The Sea Dogs (7-14) outhit Trenton 12-6, including home runs by Luke Tendler and Cole Sturgeon.

But the walks, combined with three-run homers by Abiatal Avelino and Cesar Diaz and two key Sea Dogs errors, fueled the comeback by the Thunder (14-10).

Five of the walks led to runs. Trenton first baseman Chris Gittens was 1 for 2 with four walks and two runs.

“That’s a high (for walks) for me,” Gittens said. “Obviously, you can see them (throwing balls). My mentality was not going to attack. I wanted to see where they were going to throw. It would get 2-0, and I knew I was taking.

“I think they were trying to do a little too much, and I wasn’t, surprisingly.”

Gittens credited the Thunder bullpen for giving the team a chance, as the last three Trenton relievers threw six shutout innings.

Tate was out of sync from the start, walking the first two batters. He looked ready to escape after two strikeouts, but then he left a fastball down the middle and Tate Matheny singled in a run. Tendler, who joined the Red Sox organization as a minor league Rule 5 pick before this season, followed with a three-run blast to right-center for a 4-0 lead. It was his second home run in as many days.

Sea Dogs starter Kevin McAvoy also exited early, after 22/3 innings, allowing three runs on six walks and two hits. Reliever Jake Cosart gave up one unearned run (from his own throwing error) over 31/3 innings.

Cole Sturgeon continued his blistering start to the season with a 4-for-5 night, including his fifth home run of the season. He is batting .390.

Sturgeon’s homer made it 7-4 in the fourth, and Jhon Nunez added an RBI single later in the inning.

But Portland reliever Trey Ball gave up a single, a walk and Diaz’s blast in the seventh. In the eighth, Ball walked two more. With two outs, Mandy Alvarez’s bloop to right was mishandled by second baseman Nick Lovullo, scoring two runs.

“We didn’t lose this game because we didn’t handle a pop-up,” Sea Dogs Manager Darren Fenster said. “We lost this game because we struggled throwing the ball over the plate and we struggled getting guys in from third with less than two outs.”

Portland left 14 runners on base, eight of them in scoring position.

NOTES: The announced paid attendance was 4,075. … The game took 31/2 hours. … Left-handed pitcher Kyle Hart suffered no damage to his left arm after being hit by a line drive Tuesday night. … The Sea Dogs go on a seven-day trip but do not leave New England, playing four games at Hartford, then three at Manchester. The team returns to Portland for a doubleheader on May 10 against Binghamton, the start of a five-game, four-day series. … Tendler and Tate were briefly teammates in the Rangers’ organization, with the low Class A Hickory Crawdads in 2015. Tender was a 29th-round draft pick in 2014, and Tate was the fourth overall pick in 2015. He was traded to the Yankees the next year.

Kevin Thomas can be reached at 791-7411 or:

[email protected]

Twitter: ClearTheBases