BANGOR, Maine — When Foxcroft Academy pitcher Ryan Rebar crossed home plate with two outs in the sixth inning Thursday evening, a sense of relief was evident throughout the Ponies’ dugout.

At last the scoreless deadlock had been broken, and with Rebar working on a no-hitter perhaps that was all the offensive support he needed — or would get.

But it was only the beginning.

While Rebar finished with a two-hitter, the Foxcroft Academy offense erupted for 10 runs in its final two at-bats as the Ponies knocked off two-time defending state champion Waterville 10-2 at Mansfield Stadium to win their first Eastern Maine Class B baseball title in a decade.

Story continues below advertisement.

“I was thinking, ‘OK, that might be enough and it could be a 1-0 game,’” said Foxcroft coach Mark Chevalier. “But it just spiraled from there. They didn’t hand us anything. They didn’t walk us, they didn’t make errors and there weren’t many bloop hits. We just swung the bats very well.”

Foxcroft (15-5) will face Falmouth — which was no-hit but still edged Cape Elizabeth 1-0 in the Western B final — in Saturday’s state championship game, set for 11 a.m. at Mansfield Stadium.

Waterville ended its season with a 17-3 record.

“It’s our defense that’s gotten us to this point,” said Purple Panthers’ coach Don Sawyer, “but their line drives and their hits to the gaps, there’s not much we can do about that.”

There was little Waterville could do about Rebar, either, as he struck out 11 and walked three while being backed by a 14-hit attack in which every Foxcroft starter had at least one hit — with 10 coming during the final two innings.

Control was the key to success for the junior righthander, now 8-1 this spring.

“Going into the game we knew they were a good-hitting team with a .376 batting average, so I really wanted to focus on not leaving the ball out over the plate and spotting my fastball on the corners,” said Rebar.

Cody Coiley, Forrest Law and Luke Olson each doubled, singled and drove home three runs while Rebar and Kaleb Smith each singled twice and Cameron Fadley doubled for Foxcroft, which lost to Calais in the Eastern C final a year ago before being moved up a class based on enrollment this spring.

Waterville starter J.T. Whitten limited the Ponies to just four hits through five innings and looked on his way to a scoreless sixth inning as he retired the first two batters he faced, but Rebar flared a single to center, stole second and scored the go-ahead run when Hunter Law popped a shallow single just inside the right-field line and just beyond the reach of three defenders.

An error on Fadley’s grounder to shortstop kept the inning alive, then Coiley lined a first-pitch double to left-center to drive home Law and Fadley and give Foxcroft a sudden 3-0 cushion.

“I was 0 for 2 on the day, and I said to myself if the first pitch is down the middle I’m swinging,” said Coiley.

Forrest Law hit reliever Brian Bellows’ first pitch to center for an RBI single, and after Smith walked, Olson pulled a two-run double to left to extend the lead to 6-0.

Waterville reached Rebar for two runs in the bottom of the inning, as Kaleb Kane singled, Dan Pooler walked, both runners advanced on a double steal and then scored on Whitten’s one-out single to center.

Whitten was Waterville’s final baserunner, as Rebar retired the final five batters he faced — four on strikeouts.

“[Rebar] has the heart of a champion and he’s never going to give in,” said Chevalier. “I can’t say enough about his effort. He’s been incredible all year and if there’s a better pitcher in the state I’d like to see him.”

Foxcroft added four runs in the seventh as Forrest Law doubled home two runs and Coiley and Olson added RBI singles.