Friday night’s game at Alumni Field between the Keene Swamp Bats and Valley Blue Sox was an offensive bonanza.

There were 26 combined runs, five home runs, six multi-run rallies and three lead changes, as two teams — separated by a half-game in the standings — battled for second place in the Northern Division.

It would all come down to who gave the last word, and that last word belonged to David Bedgood. The Keene designated hitter blasted a three-run, walk-off homer in the bottom of the ninth inning to lead the Bats past the Blue Sox, 14-12.

That dinger was Bedgood’s sixth on the year, moving him into a three-way tie for first in the NECBL with teammate David Matthews and the Mystic Schooners’ Terry Bowens. Brandon Smith also hit a two-run shot for the Bats (9-6) in the third. With four this year, he ranks fifth in the league.

Valley (8-6) jumped out to a 6-0 lead through the first two innings, but the Keene offense refused to lie down. After getting on the board with an unearned run in the second and adding two more on Smith’s dinger in the third, the team exploded for a six-run rally in the fourth.

Kyle Ball got the scoring started with an RBI double, then Will Wagner followed up with a two-run double. Logan Mathieu delivered the crescendo with a bases-clearing double.

The two teams traded one-run blows, but by the end of the eighth, the Bats still lead, 11-9. The Blue Sox, however, came back in the top of the ninth on a pair of homers by Natale Monastra and Isaac Alexander.

It seemed Valley might get the last word, until Bedgood stepped up to deliver the final blow.