The American held seven match points in a loss to Federer in Melbourne. (Getty Images)

Tuesday was a rough day for Tennys Sandgren, but a very big lesson. The 28-year-old American was taking on Roger Federer in the quarterfinals at the Australian Open and found out that no matter how likely the victory, the fight is never truly over.

It certainly looked like the world No. 100 would reach the semifinals after holding three match points at 5-4 in the fourth set, and then having a 6-3 lead in the eventual tiebreaker. But somehow, Federer emerged victorious, 6-3, 2-6, 2-6, 7-6 (8), 6-3.

In the midst of the drama, at 3-3 in the tiebreaker, Sandgren almost suffered an injury after being run into by a ball girl.

"That's not a distraction. That was physically painful," Sandgren said. "She was apologetic and everything. Accidents happen, so that wasn't a big deal."

Federer was suffering from a groin injury that needed a medical timeout, and figured he would be sent home packing soon. 

"[After the injury] I went out there to let him finish me off in style. But he didn't, so...", the Swiss said on court.

Sandgren's closest match point was his fifth at 6-5 in the tiebreaker, when he had a chance to finish the 20-time Grand Slam champion off at the net. Instead, he got passed. 

"In hindsight, played the volley to the open court," Sandgren said about what he could have done differently. "But I also didn't want to see a classic Roger Federer running forehand passing shot. So I thought I would play it strong cross, and he hit a great pass, yeah."

In post-match press, Sandgren's spirit was understandably in the pits.

"I mean, I could just as easily be in the semis right now, but I'm not, so..." he said. "Not encouraged right now. I have zero encouragement right now."

But on Twitter, he seemed to have regained his sense of humor. 

Sandgren's run still tied his best appearance in a Grand Slam from the 2018 Australian Open. As he goes back to the bar, or the drawing board, Federer will look to reset for his semifinal against  Novak Djokovic on Thursday.