Michael Bacica (3) pitches for the SwampBats at Alumni Field during their game against the Nighthawks on Saturday.

When Ronny Medina laid down a textbook bunt along the third base line for a single in the bottom of the second inning, it felt like things were going to go the SwampBats’ way.

The bunt single — which toed the third base line all the way to the bag — put two runners on base for the SwampBats with no outs and kickstarted a five-run inning for Keene.

The Keene SwampBats used that five-run inning to down the Upper Valley Nighthawks, 8-4, Saturday night in front of a sellout crowd of 4,893 at Alumni Field on Summer Celebration Night.

“Great game, we played very well,” said Keene manager Shaun McKenna. “A lot of guys contributed. Overall, some clutch hits and a big win.”

The win, combined with two losses from the North Adams SteepleCats, means the SwampBats clinch the Northern Division regular season title and the first-round bye that comes with it.

Jake Berry got the start for Keene and struck out a season-high eight batters in 3.2 innings. He walked five and gave up a three-run homerun in the third inning — the first of two homeruns from Upper Valley’s Gehrig Anglin — but that was the extent of the damage.

Berry was pulled after walking three batters in the fourth and Mike Bacica came out of the bullpen to eat some innings.

Bacica pitched 4.1 innings, allowing just one run on two hits and striking out four to earn the win.

“What a performance,” McKenna said. “He came in and he was fired up.”

“Berry got in a little bit of trouble, and I was able to come in and carry the team for a little bit,” Bacica said. “We knew getting this game was important. We wanted first place and we deserve first place. Good team effort.”

The bottom of the Keene lineup got things going in that big second inning, before turning it over to the hot-hitting bats at the top of the lineup to finish the job.

Axel Melendez kicked off the scoring with a two-RBI single as the No. 8 hitter. He advanced to third on an error and Zach Bushling scored him with an RBI single once the lineup turned over.

Mike Nyisztor walked and Tommy Joseph brought him and Bushling around to score on an RBI double to give Keene the 5-0 lead.

“When you get everyone included, you can see what we can do,” McKenna said. “That’s definitely a weight lifted off the pitching staff. You have to be happy for those guys.”

Upper Valley got back into the game with a three-run third inning, but another run for Keene in the fifth and two more in the sixth put the SwampBats well on their way to the win.

Bushling hit his sixth homerun of the season — a two-run homer in the sixth inning — to give Keene the 8-4 lead. Bushling finished with three RBIs on the day.

“The homerun helped, but Tommy’s double down the line [in the second inning] was huge,” Bushling said. “These guys are hitting the ball around. We were getting colder as a team there for a little bit, but now the bats are getting hot again. We’re all starting to come together. Perfect timing. That was a huge win.”

Bryce Hellgeth pitched a scoreless ninth to seal the deal.

“I love our team, we’re gritty,” McKenna said. “We did some really good things. Very, very happy.”