FORT WORTH, Texas (AP) — Caroline Garcia spiked a banana on her bench while a first-set lead was slipping away, and Daria Kasatkina later whacked a couple of balls hard into the court with her racket after losing on serve.

All that was before a tense third set filled with brilliant shot-making and all the accompanying shouts and fist pumps — with the fourth semifinal spot in the WTA Finals on the line.

Garcia claimed that last opening in the season-ending event with a thrilling 4-6, 6-1, 7-6(5) round-robin victory on Saturday.

The sixth-ranked Frenchwoman became the first in 30 matches this season to beat Kasatkina after losing the first set to the No. 8 player.

A third set that included a nine-deuce game with Kasatkina finally holding serve for a 5-4 lead ended in the tiebreaker when a scrambling Kasatkina put a volley into the net on Garcia's second match point in an 80-minute set.

“It was a crazy match,” Garcia said after 2 hours, 27 minutes of mostly battling from the baseline. “It was the best match of the group.”

Garcia and Kasatkina played the winner-take-all match after both lost to top-ranked Iga Swiatek and beat 18-year-old American Coco Gauff in group play.

Swiatek, the U.S. Open and French Open winner this year, had already clinched the top spot in the group before beating Gauff 6-3, 6-0 on Saturday. The 21-year-old from Poland dropped just 13 games in three straight-sets victories.

Swiatek will face No. 7 Aryna Sabalenka and fifth-ranked Maria Sakkari will meet Garcia in the semifinals Sunday on the indoor hard court at Dickies Arena.

The final is Monday in an event that was moved to Texas from China over concerns about the safety of Peng Shuai, a Grand Slam doubles champion who accused a former government official there of sexual assault. Coronavirus restrictions also played a part in the decision.

Gauff and doubles partner Jessica Pegula each went 0-6 in singles and doubles. They were the first Americans to make their WTA Finals debut in singles and doubles since Lindsay Davenport in 1994.

Pegula said she would take a few days to decide about going ahead with another quick turnaround for the Billie Jean King Cup starting Tuesday in Glasgow, Scotland. Swiatek has already said she would skip it.

Gauff seemed ready to welcome the event as a way to forget about her week in Texas and move on to the International Tennis Federation’s 12-nation team competition named in honor of King.

“I’ve never lost so much so fast,” Gauff said. “Going to the BJK Cup will be better. I think right now my mindset is just on that and try not to dwell too much on this. I’m kind of grateful to have that tournament because it would be an awful way to end the year on this.”

Garcia, the only player among the WTA Finals qualifiers to beat Swiatek this year, has reached the semifinals in both WTA Finals appearances. The first was in 2017. She was ranked 45th when she beat Swiatek at the Poland Open in June.

“I was already very proud to be in the top eight,” Garcia said. “It proves that this year was definitely a good year. Started very far for being in the top 10 or top eight, and made my way to it and playing a lot of matches. A lot of wins.”

Garcia tossed one of her bananas in disgust while losing 15 of the last 17 points in the first set as a 4-2 lead evaporated. The 29-year-old responded early in the second, winning six consecutive games to take a 1-0 lead in the third set.

One of those victories was a break for a 3-1 lead in the second, with Kasatkina slamming the ball that had been in play into the court, then grabbing the one she didn't use for the serve and doing the same.

Anger turned to celebration in the third with the shots being pulled off by both players.

Kasatkina broke for 3-3 by running down a drop shot and flicking a crosscourt forehand winner, then hitting a running backhand winner past Garcia in one of the few times either came to the net.

Even though Garcia couldn't convert any of the six break points in the 13-minute game at 4-4, she had one of her best shots when she ran down a drop shot for a tight-angled forehand crosscourt winner.

“The third set was, I cannot see there was a big difference between us,” said Kasatkina, whose best Grand Slam showing was a semifinal run in Paris in June. “We were just, you know, going shoulder by shoulder, and then just one or two points decided everything.”