MONMOUTH — Nobody for Monmouth really wanted the game to come down to free throws. And indeed, with a chance to cut into a five-point Madison lead, the Mustangs missed four straight foul shots in the final minutes.

But the game did come down to free throws. Madison missed a couple, and Monmouth senior Brandon Goff hit two with 8.1 seconds left, lifting the sixth-ranked Mustangs to a 46-45 victory in Wednesday night’s Western C boys basketball preliminary round game.

“We’ve got three out of our five starters back from last year,” said Monmouth junior Kasey Smith, who grabbed a game-high 13 rebounds. “Everyone’s been in these situations before. We know how to handle them now.”

Monmouth (12-7), which outscored the Bulldogs 6-0 over the final 30 seconds, moves on to play No. 3 Waynflete in the quarterfinals at 2:30 p.m., Wednesday at the Augusta Civic Center. No. 11 Madison finishes at 7-12.

“We had a good game plan. The kids executed the game plan,” Madison coach Mike Packard said. “We couldn’t seal the deal on the foul line.”

After Madison jumped out to leads of 10-2 and 16-8 in the first quarter, neither team led by more than six the rest of the way. But after a 3-pointer and a coast-to-coast layup by Derek LeBlanc, the Bulldogs were on top 45-40 and had the ball with 1:47 to go.

Madison worked the clock for nearly a minute before Monmouth forced the Bulldogs to the line. After Madison missed a free throw, Goff missed a free throw, and Madison missed another foul shot, Goff made two at the line to get Monmouth within 45-42 with 29.3 seconds left.

Madison again was fouled and missed a free throw, and at the other end, Goff drove for a basket and drew the foul. He missed the free throw, but Monmouth tied up Madison after the rebound to win possession. Hunter Richardson missed a 3-pointer, but Smith clutched the rebound and fed Goff, who was fouled with 8.1 seconds remaining.

So Goff was at the line, in the last home game of his high school career, and possibly the last game of his high school career, period. And as Monmouth coach Lucas Turner pointed out, foul shooting is not Goff’s strength.

“Forty-seven percent,” Turner said. “He shoots our team average. We’re a horrible free throw-shooting team. We’ve tried every drill, every mechanic, positive thoughts, doing this, doing that. And we just don’t make more than we miss.”

Goff swished the first one to tie the game, and Monmouth called timeout.

“I was thinking, ‘I gotta get my nerves down,’” Goff said. “And I was thinking, ‘I gotta stay calm.’ I just did what my coaches told me: Up. Down. Follow through. It will go in. I just took my time and slowed everything down.”

Goff made the second free throw, and Madison rushed upcourt. Ty Cowan passed to Jared Miller on the right wing, but Miller was well-covered. Miller passed back to Cowan, whose long 3-pointer kicked off the rim. Two Madison players desperately reached for the ball as the buzzer sounded.

“That was a conscious decision not to (call timeout),” Packard said. “We wanted to run after the free throw on a make. We like to try to run off of made free throws. It’s something we practice a lot and we feel confident with.”

Part of the reason Monmouth came back was Smith’s rebounding in the fourth quarter. He had eight in that quarter alone, a number that genuinely surprised him.

“Second in the team in rebounding, I think,” Smith said. “I grab ‘em pretty well. I don’t usually grab ‘em that well.”

Madison lost 57-35 when the teams played in Monmouth in mid-January, but was shooting like it was a practice drill in the first half. Led by Miller, LeBlanc and Chase Malloy, the Bulldogs made six of their first seven shots, and scored 18 points in the first quarter.

“Our game plan coming in was to zone trap on makes and man on misses,” Turner said. “The way they were shooting, I just didn’t want to go zone at all — I didn’t want to give them open looks. All we did was talk about the man defense and make the adjustments. That fourth quarter, we definitely buckled down on defense, I thought.”

Monmouth was within a point when Richardson drained a three with 13 seconds left in the half, but Miller came down and buried a fadeaway three from the right corner to beat the buzzer and give Madison a 32-28 lead at halftime.

“Was I surprised that we were with them? No, not at all,” Packard said. “I’ve watched the last game film a bunch of times. We didn’t play very well last time down here and they played very well. They were a big part of us playing poorly. I was certain we were going to come in here and play a good ballgame tonight.”

Matt DiFilippo — 861-9243 mdifilippo@centralmaine.com Twitter: @Matt_DiFilippo