Top-seeded Olivia Leavitt walked into her third straight singles state championship match armed with a carefully crafted approach that, after two games, she completely abandoned.

“It wasn’t working at all,” Leavitt said. “I had to switch it up and become more aggressive and come to net a lot, and I think that’s where I found my mojo.”

It wasn’t easy, but the Falmouth senior turned aside a spirited challenge Monday from St. Dominic Academy sophomore Bethany Hammond to win the Maine Principals’ Association girls’ tennis title 6-4, 7-6 (1) indoors at The Racket & Fitness Center in Portland.

The title is the third in a row for Leavitt, who beat Maisie Silverman of Brunswick in a three-set final last spring and in straight sets in the 2013 championship match, which was also moved indoors because of rain.

“It feels really good,” said Leavitt, a semifinalist as a freshman.

Monday’s match lasted just shy of two hours. It could have ended earlier had Leavitt converted one of her five match points before the second-set tiebreaker. Trailing 3-5, Hammond rallied to hold serve by winning four consecutive points, the first two with Leavitt on the brink of victory.

Leavitt then jumped ahead 40-love while serving at 5-4, but once again Hammond refused to wilt and capped a string of five straight points with a backhand passing shot.

“I knew I had to stay focused and that I could come back,” said Hammond, a 2014 semifinalist ousted by Silverman, who recently completed her first year at Bates College.

“All my match points I didn’t get, she just hit great shots,” Leavitt said. “There’s nothing you can do about it. You have to just keep playing.”

Still, it was hard to ignore what could have been. Hammond held serve to take a 6-5 lead, and the players switched ends under the looming possibility of a third set.

The feisty Leavitt gave herself a quick pep talk, held serve to force the tiebreaker, then reeled off seven straight points to close out the match after Hammond had taken a 1-0 lead in the tiebreaker. The sixth championship point was not wasted; Leavitt delivered a forehand pass to join Christine Ordway of Waynflete, Karolina Pierko of Biddeford, Anna Chai of Cony and Lindsay Whipple of Falmouth as the only girls to win more than two state singles titles. Pierko and Chai each won four.

“That’s the way you want a final to be,” said Falmouth Coach Sandra Stone. “Everybody walks away from that saying, ‘Wow, that was impressive tennis.’ ”

Hammond is a languid left-hander with a soft voice. Leavitt is a ball of energy who bounces around and yells, ‘Let’s go!’ when a critical point goes her way. They trained together at Maine Pines in Brunswick for three years, until Leavitt’s sophomore year, but had never played a match.

Hammond held serve to start the match and broke Leavitt to take a 2-0 lead. That’s when Leavitt junked her initial strategy of hitting loopy, heavy balls from the baseline and started attacking the net. She won four games in a row before Hammond tied it at 4. After a service break, Leavitt clinched the set with a forehand volley.

“She’s very competitive,” Hammond said. “I’ve known that about her since years ago. It’s really fun to get someone who puts their whole heart into it and competes really well.”

In morning semifinal matches, Leavitt defeated teammate Julia Brogan 6-1, 6-1, and Hammond beat Wells freshman Rosemary Campanella 6-1, 6-2.