MELBOURNE—Heading into Sloane Stephens’ quarterfinal against the great Serena Williams at the Australian Open, hardly anyone thought she had a serious shot to pull an upset.

Oh sure, since the 19-year-old Stephens had played her tough enough in a straight-sets loss in Brisbane three weeks ago, analysts thought she could stay competitive for two sets. But an upset of a five-time Australian Open champion—who was on a 20-match winning streak, who had won the last two majors and the Olympics and who had lost only once since late May?

Nearly unthinkable.

Except to Stephens and her USTA Player Development coaches David Nainkin and Troy Hahn.

"I think deep down she believed she had a shot, and so did I," Nainkin said after Stephens' 3-6, 7-5, 6-4 stunner in the Australian Open quarterfinals on Wednesday. "Everyone thought if she played well, she’s going to push her, but you can’t just orchestrate that kind of win overnight. That goes back to the practice courts, going over shots time and time again, getting your body strong, and eventually it happens. But you can’t just give someone a pep talk the night before and expect that kind of win to happen."

Stephens had put in the hard yards in the offseason at the USTA Training Center - West in Carson, Calif. For more than two months and six days a week, from Monday to Saturday, she worked on her fitness, drilled and played practice matches. Nainkin said that if it rained or she happened to miss a day for any reason, she would have to show up on Sunday.

She didn't miss a day.

Stephens’ talent level has been obvious since she reached the third round of the US Open in 2011—and even before that, dating back to when she won three of the four junior Grand Slam doubles titles in 2010. But she has had trouble staying healthy and missed the entire fall 2012 season while nursing an abdominal injury. So Nainkin and the USTA fitness crew first made sure she was healthy, and then they worked on polishing up her very bright and sharp gem of a game. Stephens is very fast, has ample power and has a lot of variety for her age.

But she needed a better understanding of how to win matches. She had to develop a Sloane Stephens' style of winning. Nainkin’s approach was appropriately general, getting her to dictate with her forehand, being more aggressive with her second serve returns and coming to net more.

"She’s great to work with," he said. "She doesn’t have any weaknesses, so to speak. It was giving her a clearer idea what to do with her game and keeping it simple."

When Stephens stepped on court against Williams, she listened to the PA announcer listing Serena’s many titles. But she did not lose her focus like young Aussie Bernard Tomic said he did early against Roger Federer.

"I was like, 'Do they really have to read all of her championships?'" Stephens said after the match. "I literally was thinking in my head, ‘Is he seriously reading every single tournament she's won?' It was OK. I thought about it for two seconds, but it was fine."

Serena started fast, but Stephens stayed with her off the ground in the first set. She couldn’t find a way to break her but patiently waited for an opportunity, and it came when Williams aggravated a back injury in the second set. Stephens grabbed the set, as Serena had trouble serving and the teenager was running everything down and sending it back with authority.

In the third set, as Serena began to recover, Stephens didn’t back off. When they met in Brisbane, it was Serena who kept coming forward and who took control of the match. On Wednesday in Melbourne, Stephens wanted to show her Fed Cup teammate that she could use her legs to defend and be fierce on offense.

Nainkin pointed out two things he wanted Stephens to do in the match: hit her second serve bigger, which she did, as she averaged a respectable 91 mph, and try to take over the net, which she did brilliantly, converting 18 of 20 of her approaches.

"I wanted her to come forward to the net as far as bringing an intimidation factor so she could put pressure on Serena," he said.

As she always does, Williams battled gamely, and as her back injury began to feel better in the later stages of the third set, she took it right to Stephens with a massive ground attack and big returns.

Williams actually broke the youngster to 4-3, but Stephens didn't quiver, as she was winning most of their forehand battles and was more consistent off the ground. It’s nearly impossible to get a ball past her when she’s on.

Three games later, a mentally tired Serena committed a slew of errors, and at 19 years, 10 months and three days old, Stephens became the youngest American to reach a Grand Slam singles semifinal since Serena advanced to the 2000 Wimbledon semifinals at 18 years, 9 months and eight days old.

After she came off court, Stephens and Nainkin exchanged a hearty high five.

"Last night, I was thinking about it, and someone asked me, ‘Do you think you can win?' I was like, 'Yeah, I think so,’ but I wasn't like too clear about it," Stephens said. "Then this morning when I got up, I was like, 'Look, dude, like, you can do this. Like, go out and play and do your best.'"

Stephens may have played like a veteran, but when later discussing the win, she went into teenager mode. Her Twitter followers had more than doubled from 17,000 followers to more than 40,000 in a matter of a few hours.

Singer John Legend tweeted her, as did NBA standout Dirk Nowitzki.

"I'm just excited," she said with a wide smile. "I want John Legend to sing at my wedding. I was like, 'Oh, my God. He tweeted me.’"

But there is business to be taken care of on Thursday, as she has to face defending champion Victoria Azarenka in the semis. Back-to-back wins over Serena and the world No. 1 would be mind blowing.

Stephens said she's going to do what she does best. Nainkin thinks that the quick turnaround won’t bother her.