ROCHESTER — A home run that almost wasn’t by Andy LaRoche was the difference Friday night as the Buffalo Bisons beat Rochester, 6-3, before 9,241 at Frontier Field.

The ball hit the top of the fence, bounced off a railing and onto the field of play. LaRoche hit the shot to left field that was not ruled a home run until a heated appeal by manager Marty Brown and the entire Bison bullpen that saw where the ball landed. LaRoche’s 12th home run capped a five-run seventh inning.

The win kept the Herd’s dim playoff hopes alive as they pulled within two games of Rochester and 2½ games of Norfolk in the IL wild-card race with three games remaining. The victory also guarantees the Herd (72-69) will finish with at least a .500 record. The two-game series ends tonight (radio 1520 AM) with the Herd’s Drew Hutchison (0-2, 6.46) looking for his first win. He’ll oppose P.J. Walters (6-5, 4.25). The Bisons will travel to Syracuse to close out the season with games Sunday and Monday.

With his team trailing, 3-0, in the seventh, No. 9 batter Mike Nickeas drew a leadoff walk and Mike McCoy followed with a bunt single. Blake Gailen laid down a bunt in an attempt to advance the runners, but a throwing error by Logan Darnell loaded the bases with no outs.

Luis Jimenez singled on a grounder that made its way into right field with one out, driving in Nickeas and McCoy to make it a one-run game. The next batter was LaRoche, and he blasted a 1-1 pitch just over the wall.

Buffalo added an insurance run in the eighth on Clint Robinson’s sacrifice fly, which scored Nickeas, who drew a leadoff walk. Nickeas drew three of eight walks issued by Rochester pitching.