SACO — Ben Lambert understood the doubters.

Thornton Academy may have sailed through its first seven boys’ basketball games without a defeat, but none of those opponents had a winning record.

“Nobody thinks we’re that good because we haven’t played anybody that great,” Lambert said.

On Tuesday night at Linnell Gym, the Golden Trojans took on a Gorham team ranked ahead of them in the Class AA South Heal point standings and withstood a late rally to win 71-66.

“We thought we had to come out (Tuesday) and win this game to show everybody how good we really are,” said Lambert, a senior guard.

It was Lambert who turned around a tight first half that saw 10 lead changes and had Gorham (5-3) ahead by two in the final minute and trying to set up for a last shot. Instead, Lambert made a steal and raced away for a layup. Then, after the Rams threw the ball out of bounds with just under six seconds left, he weaved his way upcourt and had the presence of mind to pump fake to clear the way for a buzzer-beating 3-pointer from the right wing.

“I knew I had time,” Lambert said. “I could see (the clock).”

That basket sent Thornton (8-0) into intermission with a 31-28 lead it never relinquished. Four times during a decisive 20-6 run in the third quarter junior forward John Fogg got behind Gorham’s defense for fast-break baskets.

Fogg finished with 14 points, the same as senior guard Jack Tilley. Senior forward Corey Hart, who picked up three fouls in the first nine minutes and played sparingly in the second quarter, added 12.

“We got key stops on defense,” Hart said. “And when we run, I think we’re the best team in the league.”

After trailing by 15 late in the third, the Rams rallied behind Billy Ruby, who scored eight straight points midway through the period to cut the margin to eight at 59-51. Gorham could come no closer until the final minute.

“We got beat in transition really badly in the third period and put ourselves in too big of a hole to come back from,” said Gorham Coach Mark Karter. “I thought we played really well in the fourth and fought back hard but just didn’t have enough to get over the top at the end.

Ruby finished with 24 points, all but eight in the fourth quarter. Center Sam Kilborn, who helped Gorham take its biggest lead at 15-11 early in the second quarter, chipped in with 20 points, 14 of them in the first half.

“You don’t see a big of that caliber every day,” said Thornton Coach Bob Davies of the 6-foot-5, 225-pound Kilborn. “It took a little while for the guys to really commit to that team defense to defend a big guy.”

Stephen Burns added 11 points for Gorham, which saw its comeback hopes fade as Thornton Academy sank 10 of 14 free throws in the final two minutes.

The Rams play at Portland Friday while the Golden Trojans visit Bangor.

“It’s a long season,” Davies said. “There’s a long way to go.”