A championship that was years in the making came to fruition for the Kennebunk High girls’ lacrosse team.

The Rams finished a 15-0 season with a 9-7 win Saturday at Fitzpatrick Stadium to earn the school’s first Class B girls’ lacrosse state title, beating a gritty Yarmouth squad that was vying for a third straight crown.

“We’ve been all working together for six or seven years, and to finish like this is the best feeling I’ve ever had,” said Olivia Sandford, one of 11 Kennebunk seniors.

Sandford, Kyra Schwartzman, Jenny Bush and Carly Sandler have powered the Rams’ offense since they were freshmen, and goalie Bella Kudas is another four-year varsity player. Fellow seniors Molly Parent and Cara Small led the defensive unit, and Kristen Koch scored Kennebunk’s first goal on a fast break off a Sandford interception.

“We’re really one big happy family and we’ve been playing together forever, the seniors. It definitely helps us to play as one unit instead of 12 individual units,” Bush said. “We didn’t want to go out any other way and we knew we had to get it done.”

Bush was taken out of Kennebunk’s set offense by the effective face guarding of Yarmouth defender Gretchen Barbera.

Schwartzman led the offense with five goals.

“I thought, we need to get this done. They’re face guarding Jenny, (so) what can we do as a team to do this?” Schwartzman said. “A couple of my goals were off of feeds. An assist is just as important as a goal. I was lucky enough for them to find me.”

Sandford and Bush each scored once and Sandler had two pretty assists. Kudas made four saves, including a point-blank stop with 52 seconds left to maintain a two-goal lead.

Kennebunk scored three goals in a span of 1:37 late in the first half to take a 5-2 lead, then pushed it to 8-3 with 11:33 remaining after Schwartzman’s fifth goal of the game.

Yarmouth responded. Eva Then (four goals) scored two man-advantage goals. A couple other calls also went against Kennebunk, preventing the Rams’ highly skilled offense from running time off.

When Clipper attack Sophia Harrison scored on a fast break after a ground-ball win and quick midfield advancement by Jessica Kirk, Yarmouth had pulled to within 8-6 with 1:12 left.

Kennebunk had lost its five previous championship games, including an overtime setback to Yarmouth last season.

“Obviously we were a little nervous, but we’ve been saying, when things don’t go our way, ‘So what? Just play the next play,” Sandford said. “We’ve been working on that a lot this year and I think that’s helped us a lot.”

Sandler scored off a free-position shot with 17 seconds left to ice the win.

Then scored the final goal as time expired.

Yarmouth Coach Dorothy Holt will return most of her core players, including Then, Kirk (goal and assist), midfielders Corey Langenbach (goal) and Eliza Lunt, Barbera and goalie Mary Kate Gunville (six saves).

“This team is a young team, but they played ‘veteran’ today,” Holt said. “I asked my youngsters to step up and they did, but Kennebunk is a good team. We knew what we were up against, but we worked hard to get here and we showed that we deserved to be here.”