They already had been playing for nearly three hours, but Friends Academy’s Calista Sha and Morgan Wilkins weren’t ready for their quarterfinal match at the state tennis tournament to end just yet.

Down 3-6 in the tiebreaker in the deciding third set, Sha and Wilkins bore down and ran off five straight points to advance with a 7-5, 4-6, 7-6 (8) win over Catherine and Megan Gamble of Rochester Webster-Schroeder at Sound Shore Indoor Tennis Sunday in Port Chester.

“I think we were just trying to stay in the moment,” Sha said. “At one point I was thinking about my homework, but I said, ‘No, I have to focus.’ I don’t know how we did it, but we pulled it out.”

And there was no letdown when the Nassau champions stepped on the court to face semifinal opponents Sydney Miller and Martyna Czarnik of Clarkstown North.

“We celebrated a little bit after the quarterfinal match,’’ Wilkins said, “but had to get back into the game mode and had to settle down.”

After a slow start, the second-seeded duo settled down just fine, winning, 6-3, 6-1, to advance to Monday’s final.

advertisement | advertise on newsday

“We hadn’t played a lot together, but playing this much in a short amount of time has allowed things to come more naturally to us,” Wilkins said.

Wilkins and Sha will play top-seeded Vanessa Ciano and Laina Campos of New Rochelle Ursuline in the final.

“We’re definitely more comfortable playing together now, and now we’re in the finals, which is crazy,” Sha said.

They’ll look to be Nassau’s third consecutive state doubles champions.

Oyster Bay’s Courtney Kowalsky, who along with partner Celeste Matute won the previous two state tournaments, will play Cold Spring Harbor’s Merri Kelly Hannity in the third-place singles match Monday after both lost in the semifinals. Hannity defeated Commack’s Kimberly Liao, 6-3, 6-0, in the quarterfinals.

Eastport-South Manor’s Jackie Bukzin was Long Island’s other singles player who advanced to the quarterfinals. In the doubles draw, Olivia Scordo and Lucia Hu of North Shore made it to the final eight. — GENE MORRIS