The Martha’s Vineyard girls tennis team earned a trip to the quarterfinals in the Division 3 state tournament thanks to a gritty 3-2 win at home Thursday afternoon over Boston Latin Academy.

With the match tied 2-2, all eyes turned to first singles, where everything hinged on sophomore Laina Dubin’s match.

“It was just all on me,” Dubin recalled after the game. “The match. It’s 2-2. So we just need one more point, or else it’s the end of our season, so that was my motivation.”

Leah Thomson crushes a backhand at first doubles. — Ray Ewing

Before the final set began, Dubin walked over to head coach Bill Rigali to ask him to hang onto a stray wrapper that had found its way to the court.

“Hey,” Coach Rigali said in a soft voice through the fence before Dubin walked away. “You can do it.”

Coach was right as Dubin won the deciding third set, down 2-3 at one point but then climbing back to win the set 6-4 and secure the match. The large crowd erupted in cheers and the rest of the team stormed the court to congratulate her.

The afternoon began with hard-fought play from both doubles teams. First doubles team Leah Thomson and Zoe Treitman won 6-0, 6-1, and the second doubles team of Ella Moran and Clementine Zeender won 6-1, 6-4.

Clementine Zeender rushes to the ball at second doubles. — Ray Ewing

Charlotte Marshard and Ellie Pennington both fell in second and third singles respectively. Marshard lost her first, rallied to win the second set, but fell in the third set 3-6.

Pennington lost in two sets.

Coach Rigali felt the hard-fought match made for an ideal afternoon.

“It was a wonderful, competitive high school athletic contest,” he said. “That’s what we want. That’s why we set this stuff up all over the country for our kids to be in these situations where they can learn about themselves, win or lose. I was so proud of our girls for keeping their heads up.”

Coach Rigali’s coaching method rests on one word: believe.

“I always believe in my players,” he said. “It doesn’t necessarily mean a win, but I believe that we can win, and it’s possible. That’s how I’ve always coached. I think athletes, and especially young teenagers, respond well to that.”

The girls posted a 15-1 record in the regular season, and earned the 3rd seed in the state tournament. Dubin said she is proud of the team’s performance this year.

“It was just a crazy improvement from last year being one of the bottom seeds in the playoffs and now being at the top and going into the round of eight,” she said. “I’m just proud of our whole team. We’re just looking forward to play again.”

The girls will host Newburyport at home in the quarterfinals on Thursday at 3 p.m.