The Buffalo Bandits probably were a little rusty when they took their postgame victory lap in First Niagara Center on Friday night.

After all, they hadn’t done it since January 26, 2013.

The Bandits ended a franchise record seven-game home losing streak when they defeated the Toronto Rock, 12-10, before 11,404.

On a night when Buffalo took some big steps forward in rebounding from an opening night loss two weeks ago, getting a win at home might have been the biggest.

“One of the goals we set, beginning back in training camp, was that when teams come in here, that they would be in for a battle,” Bandits’ coach Troy Cordingley said. “It was a battle. That was good lacrosse. That was a good game.”

“It’s great to have the fans on our side,” goalie Anthony Cosmo added. “We gave them something to cheer about tonight. Our energy level was good.”

The game had a little bit of everything - good defense and goaltending, unexpected heroes, a rally that appeared out of nowhere, and an outcome that wasn’t decided until the final few minutes.

At the beginning of the game, Toronto was the team doing all of the scoring. The Rock got its offense going with a pair of power-play goals in the first period, and had a 4-0 lead before 11 minutes of play had elapsed.

The Bandits’ scoring drought lasted for more than 22 minutes before Ryan Benesch got Buffalo on the board. He added another later in the second quarter, but Toronto still had a 6-2 lead at halftime.

“It thought the game was pretty evenly matched in the first half,” Cordingley said. Toronto goalie Nick “Rose was unbelievable. We had some great quality shots, and he was making huge shots.”

Buffalo’s defense took its game up another notch at the start of the third quarter, as Toronto was suddenly getting fewer good chances. When the Rock did get a good shot, Cosmo was around to smother it.

“It’s 10 guys that dug in and played hard and did what we asked,” Cordingley said about the defense. “It was a little bit of a pride thing, the way were awful in the first game.”

There was no scoring in the first 11 minutes of the period, when Buffalo received a huge boost from a very unexpected source. Defenseman Steve Priolo finished off an odd-man break by scoring on a rebound; it was only the fifth goal of his career.

“Troy wanted me to push the ball when I could,” Priolo said.

That was followed in rapid-fire succession by goals from Benesch, Chad Culp and Mark Steenhuis to tie the game at 6-6 after 45 minutes. Then Aaron Wilson and Jamie Rooney completed the run with goals to start the fourth quarter.

The final totals: six goals in five minutes, 15 seconds.

“They finally started dropping for us when we got a couple of transitional opportunities,” Cordingley said. “We got the confidence and momentum going there.”

Benesch said it was important that the Bandits didn’t get frustrated when they weren’t scoring.

“It is a little bit” discouraging, “but that’s going to happen. We had to not get down on ourselves,” he said.

Toronto tied the game, 8-8, a couple of minutes later. Buffalo took the lead for good on Andrew Watt’s first goal as a member of the Bandits, which came with 8:10 left. Priolo, having discovered a scoring touch, struck again a minute later, and the Bandits were ahead for good.

Cosmo did the rest, playing one of his best games as a Bandit. He stopped 52 of 62 shots on the night.

“He played awesome,” Priolo said. “He made some big saves, and we can feed off that. If we mess up on defense, and we will sometimes, we know he’ll make the save.”

Benesch finished with three goals and two assists for five points. Rooney had a goal and three assists, Dhane Smith had four assists, and John Tavares got his first of the season.

For Toronto, Colin Doyle had three goals and two assists for five points, including the 400th goal of his career as a member of the Rock. Josh Sanderson added five assists.

The game was the first half of a busy weekend for the Bandits. Next stop: Philadelphia, winners in Buffalo two weeks ago, on Sunday afternoon.

“We obviously want to get both games,” Benesch said. “We owe Philly a better game this time. They really pushed us around.”