SAN MARINO — First place in the Rio Hondo League was up for grabs when the last two undefeated teams, La Canada and San Marino high, squared off Friday night.

The Spartans were poised to run away with the game early, shooting out to an 11-point lead in the first quarter, but the Titans came back strong in the second and cut the deficit to four by halftime.

San Marino couldn’t match that performance in the third frame, as La Cañada returned to its first-quarter form en route to a 54-39 victory on the road.

“Sometimes we just have a dead second quarter and then we usually get it figured out by the second half,” said La Cañada Coach Tamar Hill, who got a double-double from junior point guard Courtney Chen (14 points, 10 rebounds).

The victory gives the Spartans, who are ranked fifth in CIF Southern Section Division III-A, sole possession of first place in Rio Hondo, as they improved to 12-7, 4-0 in league. They’ll look to stay perfect when they host No. 6-ranked South Pasadena (15-4, 3-1) on Wednesday at 5:15 p.m.

“That’s going to be a tough match with a CIF-division opponent, so this was a game we really needed to show up to, establish who we are and make a statement going into the second half of league,” Hill said.

San Marino Coach Kenny Fisher felt Friday may have been an emotional letdown from his team, as it was coming off a one-point win over South Pas, 48-47, on the road Wednesday.

“We just didn’t come out ready to play. We were doing stuff that’s uncharacteristic of us,” said Fisher, citing the Titans’ 14 turnovers and sloppy defense. “I don’t think we were mentally into it. … Maybe it’s one of those nights and maybe it’s the energy, the charge of the last game and all of the emotion of that.”

The Spartans jumped out to an 11-point lead, 20-9, with 30 seconds to go in the first when Keilee Bessho (12 points) cashed in a putback bucket. San Marino responded with a 14-7 run of its own to narrow the lead to 27-23.

It was the long-range shooting the Titans (12-8, 3-1) have become known for under recent years that led them back with 12 of those points coming on three-pointers with Jessica Pleitez (12 points) hitting three of them.

La Cañada started and closed the third quarter with a 7-0 and 6-0 run, respectively. Chen extended the Spartans’ lead to 11, 34-23, when she sank a three-pointer 1:29 into the second half.

San Marino brought the deficit back to single digits when Felita Salim (eight points) notched a layup with 1:25 left in the quarter to bring the score to 40-31. Sarah Borland answered with a three-pointer for La Cañada about 15 seconds later and the Spartans took a 15-point advantage into the fourth after Chen cashed in a pair of free throws with a second left in the frame.

Perhaps the biggest key to La Cañada pulling away in the second half was its defense. After scoring 11 points in the first half — seven in the first quarter — San Marino’s Leigh Kunitake was held to just three points in the second half.

“Luckily, [Kunitake] didn’t get hot again,” Hill said. “Keilee did a good job of guarding her. … You shut her down and you really kind of shut down their flow.”

La Cañada also established its post game in the second half with forward Lauren Barsamian scoring six of her 12 points in the third. The forward also finished with eight rebounds.

“It feels nice [to be in first place], but we can’t get complacent with where we are,” Chen said. “We have to keep going. We want to win and we have to keep working at this, but [the win] is a huge confidence boost.”