BATH — This was a Scarborough High boys’ soccer team that knew how to win, a group of dyed Mohawk-wearing players who simply found a way, game after game.

On Saturday they did it by coming from behind … going to overtime … and winning the Class A state championship.

Sam Ware scored with 8:08 left in overtime to cap Scarborough’s 2-1 rally past Hampden Academy in the state final at McMann Field.

Scarborough (17-1), the No. 1 seed in the West, brought home a Gold Ball for the second consecutive year and fifth time in seven seasons.

Hampden Academy (16-2), the top seed in the East, made its first appearance in the state final since 2004.

Matt Caron’s smart play set up Ware’s winner. With his back to the Hampden goal, he trapped the ball with his chest and slipped it back into Ware’s path.

“There was a guy right on my back and there was no way of getting around him,” Caron said. “Sam made a great run, so I just gave it to him.”

The goal came after the Red Storm’s furious second-half rally to tie it with 7:19 remaining. Charlie Mader got on the end of a long, arching pass from defender Mike Caryl and chipped the ball over the onrushing keeper, Isaiah Bess (21 saves).

“It felt really good to finally get one,” Mader said, “because we had a lot of chances up to that point.”

The Red Storm were shocked to be in that position in the first place. After carrying play for most of the first half, they seemed intent on more of the same. But the Broncos’ counter-attack caught them by surprise just 58 seconds into the second half, when Noah Parker finished a give-and-go with Paxton Oversmith for a 1-0 lead.

“After we scored we thought we might get another one in the next five minutes, hoping they’d be down a bit, but they came back real quick. They weren’t going to let us score that quickly,” Hampden Coach Josh Stevens said. “Some days things don’t go your way and today’s a perfect example of that.”

“We started doing more over-the-top balls in the second half and it seemed to work,” Ware said. After Hampden scored, “we just worked harder and harder and found a way to win.”

Some of Scarborough’s hardest workers were in its defensive third. Pat Stanton (eight saves) and his back line of Andrew Morrissey, Joe Lancaster, Caryl and Chris Cowie cleared loose balls repeatedly. Along with midfielders Wyatt Omsberg and Ian Corey, they held Eastern Class A’s top scoring striker tandem of Dan Good and Tristan Gardner (28 goals combined) without a point.

Heading to overtime, Scarborough Coach Mark Diaz said, the Red Storm were ready to win.

“We were pretty happy to be at 1-1,” he said. “We just wanted to go back to what we were doing in the first half and get a break.

“They find ways to win, this group. They’re pretty tough mentally.”