On a beautiful, 77-degree cloudless afternoon at Hadlock Park, the Reading Fightin Phils and Portland Sea Dogs ensured that fans would make the most of it, playing a marathon game – three hours, 31 minutes.

Nate Freiman made sure the home crowd went home happy. Freiman swatted a three-run homer in the eighth inning to give the Sea Dogs a 9-8 win Sunday before 6,631 at Hadlock.

The game was a slugfest for four innings, with Reading taking an 8-6 lead off Sea Dogs starter Kevin McAvoy, led by home runs from Harold Martinez and Jorge Alfaro.

Portland relievers Nik Turley and Austin Maddox (2-0) kept the Phils scoreless for the final five innings, with Turley striking out eight.

“They were huge,” Sea Dogs Manager Carlos Febles said. “They came in and put zeroes on the board and gave us a chance.”

That chance came in the eighth. With one out, Andrew Benintendi singled off lefty reliever Hoby Milner (4-1). Cody Decker followed with a double, and then Freiman swatted a fastball over the left-field wall.

“That guy is a good pitcher,” Freiman said of Milner, who has a 2.05 ERA. “I’ve faced him before. I just got a good pitch to hit.”

The Sea Dogs had 13 hits, led by Benintendi (3 for 4 with a walk). Yoan Moncada, Mauricio Dubon, Cole Sturgeon and Freiman all had two hits. Benintendi and Sturgeon both had two RBI.

Reading had 11 hits, but only three after the fourth inning. Turley, a lefty in his first year in the Red Sox organization, retired nine of 11 batters.

Maddox, a third-round draft pick in 2012, was making his seventh appearance for Portland. He continues to be dominant, with a 0.53 ERA.

After a 1-2-3 eighth, Maddox escaped a first-and-third, two-out jam in the ninth by getting Jake Fox to pop up on an outside fastball.

NOTES: Portland (27-47) stopped a four-game losing streak, going 2-6 on the homestand. Sea Dogs starting pitcher had an 11.63 ERA during the homestand. … Reading (53-23) still leads the Eastern League’s East Division by six games. … Dubon is having a nice start to his Double-A career. In three games, he’s 5 for 11 (.455). … Freiman leads the team with five home runs. Benintendi and Sturgeon both have three. … The Sea Dogs left after the game for a three-game series starting Monday in Trenton, New Jersey. The team returns Thursday for a five-game series against the Hartford Yard Goats at Hadlock Field. That series will include a doubleheader Friday and fireworks Sunday night.