Connor Buckley scored 19 points to lead second-seeded South Portland to a 51-36 victory against No. 3 Thornton Academy in a Class AA South boys’ basketball semifinal Tuesday night at Cross Insurance Arena.

The victory, which sends the Red Riots (15-5) to the regional final Friday night against Scarborough, came exactly one month after Thornton (9-11) rolled to a 76-64 win against South Portland in their only regular-season meeting.

“I think what helped us the most is that we lost at Thornton during the regular season,” South Portland Coach Kevin Millington said.

“It gave us a chance to break down film and see why we lost. Tonight, the key was keeping them out of the paint. We knew we had to defend inside out today.”

“We pinched the middle,” Buckley said. “That was our main focus, keeping them out of the paint, because that was how they got the better of us last time.”

South Portland broke the game open early in the second half. The Riots (15-5) opened the third quarter with a 7-0 run and ended it with another 7-0 run for a 41-21 lead. They sank 9 of 10 free throws in the quarter.

“I thought the kids did a good job,” Millington said. “We prepared well.”

The Trojans, meanwhile, shot 32 percent (6 of 19) in the second half.

“We didn’t make shots,” Thornton Coach Bob Davies said. “The first game, we made shots, but this is the game that counts. It was a good defensive effort by them.”

“They beat us by making shots at (Saco) that are tough to make at (Cross Insurance Arena),” Millington said.

The Trojans also committed 13 turnovers in the second half.

“They’re high school kids and they do the best they can,” Davies said.

The Riots led 13-12 after one quarter. Noah Malone broke a 10-10 tie with a three-point play with 2.7 seconds left, but that was enough time for the Trojans to get a shot at the other end and for Jack Pyzynski to put in the rebound.

South Portland connected on 50 percent of its shots in the first half (10 of 20) and took a 25-20 lead into the break. Thornton sank just 2 of 9 shots in the second quarter, but Will Chapman made four throws to keep the Trojans close.

Chapman led the Trojans with eight of his points – all in the first half.

The Riots were missing two of their top players, seniors Riley Hassan and Liam Coyne, because of injuries sustained late in the regular season, but several players stepped up in their absence.

“David Fiorini was a big factor early,” Millington said. “There were games this year where he didn’t even get off the bench, and he got thrown into a starting role. ”

A junior guard, Fiorini scored South Portland’s first five points.

Buckley and Malone took on the responsibility of setting the tone for the Red Riots.

“We’re seniors and it’s our job to lead the team,” he said.

Malone scored nine points.