LAYTON — Thirty minutes before tip-off, just about every seat in Layton High School’s gymnasium was filled and there was a certain energy present in the building that hadn’t been around the local high school basketball scene lately.

By the second quarter, it was a standing-room-only crowd that roared at every basket, every foul call, every steal, everything.

“Last year the Davis game was big but, I mean, we weren’t the best team last year,” Layton senior Tanner Kofoed said. “This year, we’ve got No. 1 and No. 2 in the state so I knew it was going to be crowded.”

It helps, Kofoed said, when the aforementioned crowd is backing up the home team.

In one of the most highly anticipated boys basketball games of the season, Layton edged Davis 67-62 to remain unbeaten overall and take over solo first place in Region 1.

As the back-and-forth game approached what many expected would be a thrilling conclusion, the dagger came with 43.8 seconds left in the fourth quarter.

Boston Painter rebounded a missed free throw and the ball ended up in the hands of Ethan Potter, who rose for a huge slam dunk that put Layton (13-0, 6-0 Region 1) ahead 63-54.

The roof blew off, so to speak.

“That felt amazing getting the crowd hyped there,” said Potter, Layton’s leading scorer. “That was big with Boston getting the offensive rebound like that, the momentum had already been shifting with our lead, but that really kind of sealed the game at the end right there, and hitting some clutch free throws.”

Layton-Davis is a lot of things. It’s a big, bitter, local rivalry between old schools that always draws a big crowd.

It’s also usually a chess match, but really it was the first move by Layton that put Davis off-kilter and made the dominoes start falling.

Layton came out in a man-to-man defense against Davis (12-1, 5-1) instead of its usual 1-3-1 zone, with the idea being that the Darts and their good shooters would attack the exposed corners of a 1-3-1.

The defense held Davis to a season-low 38.9% shooting from the field and an 8-of-29 mark from 3-point range (27.6%).

Once the Lancers got some separation in the decisive third quarter, it forced the Darts to shoot a ton of quick 3s and go away from what had made them 12-0: attacking the basket.

“I don’t think we played very well offensively. It was the defensive end, but offensively we just quit sharing the basketball like we have all season,” Davis head coach Chad Sims said.

The Darts had 11 assists after previously averaging 17.4 per game. Potter credited the crowd for making Davis rush its offense and take those quick shots.

Early on, it looked like Davis was going to go through another layup drill-type game like it did in the 85-74 win at Fremont when the Darts shot 66% from the floor and 79% from inside the arc.

Jax Pearce, who shot 6 of 7 and scored 12 points, made two buckets underneath and Rex Sunderland made a 3-pointer for a 7-3 lead.

Layton got its mojo going on offense and soon took a 13-12 lead on back-to-back dunks by Painter and Potter. Then Preston Squire took over.

The 6-foot-11 Wasatch Academy transfer scored the next eight points — he had 11 total — on two 3-pointers and a tough inside bucket, giving the Lancers a 21-14 lead early in the second quarter.

Davis subbed in Dylan Perrenoud, who averages 10.9 points per game off the bench, and he scored the next seven Davis points to bring the score to a 21-21 tie, which eventually was a 29-29 halftime tie.

Perrenoud led Davis with 17 points.

Then it was Layton point guard Tanner Kofoed who went on a solo scoring run, making a 3-pointer, two free throws and a fast-break basket to put the Lancers ahead 36-31.

Kofoed scored 15 points, on 10-of-11 free-throw shooting, with five assists. That lead grew to 46-37 on a Jacob Randall 3-pointer and 48-37 when Potter scored past a triple team.

Potter, who led Layton with 18 points, picked up his fourth foul with 7:38 left in the game and didn’t return until the 2:20 mark.

“I really thought when Ethan got in foul trouble, guys like Boston Painter really stepped up for us on the offensive glass and finishing strong,” Lancers head coach Kelby Miller said.

Painter had 13 points on 5-of-7 shooting with 10 rebounds, including five offensive boards. Randall scored 10.

It was no fault of Davis that it couldn’t cut more into the lead with Potter on the bench, but rather that the Lancers went 17 of 19 from the free-throw line in the fourth quarter and 21 of 24 overall.

“I just think how we played down the stretch, maintained our composure, we had a little stretch there where both sides were taking and missing some quick shots, but we kind of bounced back from that to finish them off,” Miller said.

Layton’s challenge now is to come down off the high of beating a rival team in front of a capacity crowd and TV cameras, go on the road Tuesday to play Fremont and try and contain one of the best guard tandems in the state.

You can reach prep sports reporter Patrick Carr via email at pcarr@standard.net. Follow him on Twitter @patrickcarr_ and on Facebook at facebook.com/patrickcarr17/.

See what people are talking about at The Community Table!