Despite playing six matches to Williams' three, Collins came into this encounter having spent 24 minutes less on court than her American opponent (6 hours 58 minutes for Collins and 7 hours 22 for Williams).
Four double faults in the second brought Stephens back into contention as Azarenka lost three consecutive service games.
Years ago, Stephens was going through qualifying in order to achieve the privilege of making the main field in the Miami Open.
The 20-year-old Latvian and the 25-year-old American have never played, but they come in as a well-matched pair. "So I knew if I did that in the second I'd be right in there".
In a counter-intuitive development after a tight first set that saw 10 break points combined, in the second Collins and Ostapenko rolled through their service games after the lone break that decided the game, the set and the match. "Because sometimes I was playing one match incredible, the next one not that great".
"I was hurting a little bit today, but it was on and off all the time", Svitolina said afterwards.More news: Kevin Love In Concussion Protocol
More news: Ex-Russian spy was likely poisoned at his front door
More news: Withdrawals continue from Syrian rebels' shrinking Eastern Ghouta enclave
It was only the fourth tournament for Azarenka since 2016.
The rankings of the players she defeated in that event hovered between No. 71 and No. 155.
Stephens played on. She didn't want to be a quitter.
She wasn't starstruck when facing her idol. Azarenka has been involved in a custody dispute for several months and is headed back to Los Angeles, where she makes her home.
She arrived in Key Biscayne with US$305,385 in career earnings, which she will add at least US$327,965 to by advancing to the semi-finals.
"I have put in the hard work my whole life, so at the end of the day, I know I have done literally everything I can do to put myself in the best situation", said Collins.
Ostapenko knocked out the highest ranked player left in the draw No. 4 Elina Svitolina 7-6 (3), 7-6 (5). "And if I win the match, I win the match and it's awesome". Ostapenko won a tournament, in Seoul, South Korea, last fall.
The Miami Open isn't ending, but it's moving about a half-hour's drive north to the Miami Dolphins' stadium next year. "And when I had a chance, I was going for it". Stephens said. "There's so many questions. I think anyone would be".