INDIAN WELLS, Calif. — Paula Badosa edged Victoria Azarenka 7-6 (5), 2-6, 7-6 (2) on Sunday to win the BNP Paribas Open in her debut in the Southern California desert, where the tournament returned after a 2 1/2-year absence because of the coronavirus.

She joined Bianca Andreescu in 2019 and Serena Williams in 1999 in winning the title in her first appearance. It was Badosa’s second title of her career, having won in Belgrade earlier this year.

Cameron Norrie played Nikoloz Basilashvili in the men’s final later.

Badosa and Azarenka struggled for over three hours, trading back-to-back service breaks five times. The last time Azarenka broke for a 5-4 lead in the third, and Badosa broke right back for a 5-all tie.

Badosa missed a backhand that allowed Azarenka to hold at 6-all.

Badosa dominated the tiebreaker, racing to a 6-2 lead. Azarenka dumped a forehand into the net to give Badosa match point.

Badosa cracked a forehand winner, then collapsed at the baseline. She lie face down, crying and shaking, before getting up. Azarenka came around the net and hugged the 23-year-old Spaniard.

“I remember when I was 14, 15 years old seeing you,” Badosa told Azarenka after raising the crystal trophy. “I told my coach, ‘One day I hope I can play like her.'”

Azarenka, the two-time major champion and former top-ranked player, was seeking just her second title since 2016. The 32-year-old from Belarus came up short in her bid to become the first woman to win Indian Wells three times, having taken the title in 2012 and 2016.

Azarenka noted her 4-year-old son, Leo, was watching on TV.

“I’m not bringing home the biggest trophy,“ she said, “but it’s still a trophy and I’m sure he’ll enjoy playing with it.”

In the first-set tiebreaker, Badosa had leads of 4-0 and 5-3. Azarenka tied it 5-all on Badosa’s netted forehand. Azarenka missed a backhand to give Badosa a set point and the Spaniard cashed in with a backhand winner to take the set.

Badosa earned $1.2 million, more than her previous prize money for the year of just over $1 million.

She came into the tournament ranked 27th in the world; a year ago she was 87th. Badosa is projected to rise to a career-best 13th in Monday’s WTA Tour rankings.

Badosa may not be done this year, either. By winning the title, she overtook Ons Jabeur for the eighth and last qualifying spot in the race to the WTA Finals, to be held next month in Guadalajara, Mexico.

The combined ATP and WTA tour event was one of the first major sporting events canceled in March 2020 when the coronavirus took hold in the U.S. It will return to its usual March slot next year.