BATH — Lily Posternak was not going to lose. Not on Saturday. Not in the final game of her storied high school career.

So Posternak took control and carried York High to its third consecutive Class B field hockey state championship.

Posternak, a senior center midfielder, scored two goals, including the winner with 3:22 remaining, to lift York to a 2-1 victory over Belfast at McMann Field.

The win was the 54th straight for the Wildcats, completing three consecutive 18-0 seasons.

“Just incredible,” said Posternak, who will next play at Duke. “I couldn’t ask for a better way to end my high school career.”

And what a career it was.

Posternak and senior sweeper Ali Lawlor went 71-1 at York, the lone loss to Nokomis in the 2013 state title game.

This was a also a special victory for Coach Barb Marois. These programs had played in four previous Class B state finals since 2004 with Belfast winning each time by a goal.

“It’s huge,” said Marois. “I don’t think all the girls know the history yet, but they’ll find out on the bus.”

Posternak, a finalist for Miss Maine Field Hockey, scored on a penalty stroke in the first half for her first goal.

But Kylie Nelson, also one of the three finalists for Miss Maine Field Hockey, tied it with a spectacular rush and goal just 2:37 into the second half.

It stayed that way deep into the second half, despite both teams having good chances inside the circle.

But Belfast’s defense, led by Sabrina Wood and Maya Cunningham, continually pushed back York. And Samantha Dargie and Lawlor helped to keep the Lions (16-2) at bay.

With just under four minutes remaining, Emlyn Patry of York pushed the ball up to Posternak just outside the circle. She worked to her right, around three defenders, then unleashed what Marois called “a rocket” through the pads of goalie Morgan Fernald.

“I was just trying to get it on net,” said Posternak. “It went in. And I’m thankful for that now.”

“That’s why she’s a finalist,” said Belfast Coach Jan Holmes Jackson. “She carried it in and put it in there at the end.”

Marois called a timeout following the goal to remind her Wildcats of their defensive responsibilities. Belfast didn’t get another shot.

“The girls played great, never gave up,” said Jackson. “We had some good chances to finish and put it in, and we just didn’t. It happens. You’ve got to score more goals in this game.”

York had early control but Fernald (eight saves) made a couple of sprawling pad saves on Posternak.

The Wildcats eventually were awarded a corner, with Posternak pushing the ball to Patry on the right.

A scrum ensued and York was awarded a penalty stroke when a defender stopped the ball from going over the goal line with her foot.

Posternak, who missed her only other penalty stroke this year when she hit the post, ripped a shot just inside the left post for a 1-0 lead with 7:31 left in the half.

The dynamic Nelson tied it early in the second, carrying the ball down the left through three defenders and putting the shot past Julianna Kiklis.

“They were tough,” said Lawlor. “It’s always a challenge when someone scores. We knew we had to just play our game.”

And that meant focusing on what was happening, not what could be or what was on the line.

“I’m proud of all the girls in the program,” said Marois. “There’s a lot of talk outside the program about the streaks and this and that. And they were able to just stay within themselves and focus on whatever was next. I think that helps when you keep your focus in the right place.

“It’s special, very special.”