Medvedev served well: after winning the second and third sets without much drama, the fourth seed traded six holds with the stout Swiss, offering just one break point along the way.
He would lose the set in a tiebreaker.
Medvedev rallied well: as the fifth set began, Medvedev put the fourth-set disappointment behind him, and put the ball mostly wherever he wanted. And he did it with the pace necessary to keep up with Wawrinka's booming groundies.
He would lose some of his best-played points because—incredibly—Wawrinka's defense was as impressive as his offense.
Medvedev returned well: he earned three break points at 1-2, after Wawrinka had earned an early break in the decider.
He would—wait for it—lose the game.
Medvedev served well, rallied well and returned well.
Wawrinka just did it all a little bit better when it mattered most.
"After a loss I'm not disappointed too much," said Medvedev. "Here I'm like I did my best. Of course, I could do some shots better. But he played a great match. I wish him only luck for the rest of the tournament."
It was hard to ask much more of Medvedev, who played a fine match against Wawrinka overall. But the US Open finalist is now 0-6 in fifth sets, as Wawrinka earned his first win over Medvedev in three tries, 6-2, 2-6, 4-6, 7-6 (2), 6-2.
"Of course, feels not good to never win one," said Medvedev. "Well, I'll probably have many more opportunities.
"As I say, me, I don't like to play five sets. I get tired. Even though I'm there, I want to win it. As I say, at this moment, didn't win one in my life. We'll try better next time."
It took Wawrinka some time to find the proverbial zone, where his groundstrokes appear harder-struck than anyone in tennis history, where his one-handed backhand holds up against any opposition, and where his form is probably good enough to defeat any opponent, Big Three included. (In all three of his Grand Slam wins, Wawrinka beat Novak Djokovic or Rafael Nadal for the title.)
"Really tough to play against Danny," said Wawrinka, who is into his fifth Australian Open quarterfinal.
"I'm really happy again the way I'm fighting, the way I'm finding solution and the level of the game."
In total, Medvedev struck 44 winners and 35 unforced errors—29 less than Wawrinka's total. But Wawrinka could accept that total with a winner count of 71, and a 76 percent conversion rate on first-serve points.
Add in the fact that not all winners are created equal, and you can see how Wawrinka pulled ahead. Winners struck in the fifth set had more value than those in the second or third, and I'll give you one guess as to who hit more of those.
"After I lost a little bit my confidence in my forehand, he had the confidence to really go for it," Wawrinka said of Medvedev's play in the second set. "I had to really fight with myself to go a little bit against my game, trying to keep pushing him, trying to keep trying to go to the net. I was losing a lot of points. I knew that was the key: try to be aggressive."
Wawrinka will next face either Alexander Zverev or Andrey Rublev.