At one point this season, Braintree was 5-4-1.
Now, the Wamps will be playing for the Division 1 championship.
Top-seeded Braintree edged sixth-seeded Barnstable, 5-4, in the Division 1 South final Sunday at Gallo Arena in Bourne.
“I never would have thought I would be playing here in January when we were 5-4-1,” said forward Kyle Leslie, who scored two goals and assisted on one. “But we knew that we had the talent to overcome what we were doing.
“We had a couple of days off. We regrouped and went on a winning streak.”
One reason why the Wamps (16-5-3) revived their season was the improved play of the Leslie-Nick Ward-Brian Gallagher line.
Against Barnstable, Gallagher scored one goal and assisted on two.
“Our line really started to click,” Leslie said. “We’re best friends. We knew we could play better.”
Braintree’s Gino LaRossa started the scoring just 61 seconds in, beating Barnstable goalie Kevin Huska.
The Wamps made it 2-0 at 7:13 on a Gallagher goal, and upped their lead to 3-0 when Leslie snapped home a shot from the right circle at 13:06.
“Our key today was we had to jump on them early,” Braintree coach Dave Fasano said. “They had a lot of fans here, [just] as we did. But we said we had to get on them early and try to get the crowd out early.”
Braintree built a 5-1 lead on goals by LaRossa (8:11 of the second) and Leslie (32 seconds into the third).
In the third, Barnstable (15-6-3) reeled off power-play goals by Mike McDonough and Chris Fowler, and a goal by Cam Curtin with an extra attacker.
Curtin’s goal came with 2:56 left in regulation, but Braintree held on, due in large part to the play of goalie Nick Anson (19 saves).
“The one thing about Nick Anson is he’s a competitor and a battler,” Fasano said. “You weren’t going to rattle him.’’
Division 2 — Behind two goals from senior forward Justin Hirschfeld, Medfield had enough cushion to fight off a last-minute rally from Canton for a 3-2 win at Gallo Arena.
“We knew it was never going to be easy,” Medfield coach Toby Carlow said. “We did the little things that we needed to do and executed on the chances they gave us.”
Hirschfeld scored his first goal 13:56 into the first period, putting a rebound off his own miss past Bulldogs sophomore Justin Slocum. He beat Slocum again 7:10 into the second period, with sophomore forward Matt Treiber assisting.
“The first goal was huge,” Hirschfeld said. “It was definitely a big lift for our team, boosted everyone’s confidence, and then we got going after that.”
Senior forward Matt Dresens’s power-play goal 7:36 into the third period made the score 3-0 and proved to be the difference for Medfield (18-3-3).
Senior defenseman Anthony Francescon and sophomore forward John Femia each scored late to fuel the comeback attempt for Canton (15-5-4).
Division 3 — Senior forward Phil Nevins scored two goals and added one assist to lead a balanced Hanover attack in a 6-2 win over Bishop Stang at Gallo Arena.
The Indians sealed the victory with a three-goal final period. Overall, five players accounted for the team’s six goals.
“This is something we talked about at the beginning of the year: finishing strong,” Hanover coach Jonny Abban said.
“They’re not done yet, they want to win a state championship. It’s a great group effort, every game we show up with it.”
On Nevins’s first goal, the senior tipped home a slap shot from senior defenseman Matt Beard 6:06 into the second period, making it 3-1. His strike came just 12 seconds after senior forward Chace Correia scored for the Spartans (15-9-1), which had cut the deficit in half.
“Just after a goal, it was a big momentum change. Momentum can change a game right away,” Nevins said.
“The [TD] Garden is the ultimate goal. Wayland’s up next, we’re going to run right through them to get there.”
For Hanover (17-7-0), senior forwards Matt McDougall and Mitch Beard, sophomore forward Landen Hasenfuss, and sophomore center Colin Mahony each found the back of the net.Globe correspondent Jake Fischer contributed to this report.