British number one Emma Raducanu put in an impressive showing to beat Beatriz Haddad Maia 6-1 2-6 6-4 in the third round at Indian Wells.
Raducanu, 20, broke the Brazilian world number 13 twice in the first set, but dropped her serve twice in the second.
In the decider Raducanu produced some brilliant tennis, breaking Haddad Maia in the seventh game before serving out the match in California.
She will play world number one Iga Swiatek in the last 16.
Poland's Swiatek beat Canadian Bianca Andreescu 6-3 7-6 (7-1).
"I wanted to step up and be more aggressive and, if I were to lose, then I would lose going for my shots and doing the right things," Raducanu told BBC Sport.
"Last year I would probably get more tentative in those moments, but today and more recently I've been going for my shots more."
Raducanu only decided to play in this tournament 20 minutes before her first match amid illness and a recurring wrist injury.
Victory - completed in two hours 19 minutes - was her first against a top-20 player since she won the US Open in 2021.
"For me it's pretty amazing," Raducanu told Amazon Prime.
"I haven't really prepared for this tournament or practised, so to come out and play at this level and be competitive is a great sign for me."
Wimbledon champion Elena Rybakina beat Spaniard Paula Badosa 6-3 7-5, while France's Caroline Garcia also reached the last 16 courtesy of a 6-4 6-7 (7-5) 6-1 win over Canadian Leylah Fernandez.
Qualifier Varvara Gracheva shocked eighth seed and fellow Russian Daria Kasatkina to set up a tie with Kazakhstan's Rybakina.
BBC tennis correspondent Russell Fuller
It's quite a win for Emma Raducanu. Who knows what's around the corner? When there have been brighter moments for her over the past 18 months, they have been followed very swiftly by disappointment.
The thing to point out is, other than a tournament in Seoul, this is the first time she has won three matches in a row since winning the US Open.
Seoul last year is a world away from doing it at Indian Wells, especially with so little preparation.
Whatever happens in the next match, this tournament has been a big success for Raducanu.