Roger Federer was docked $3,000 on Wednesday for using an audible obscenity during his quarterfinal win over American Tennys Sandgren at the Australian Open.

The 20-time Grand Slam champion was given a warning for swearing during his great escape against Sandgren, when he saved seven match points before winning in five sets to set up a semifinal against seven-time champion Novak Djokovic.

According to the International Tennis Federation, which administers the fines, it is only the second time in his career that Federer has been fined at any of the four major tournaments. The only other time Federer was fined at a major was in the final of the US Open in 2009, when he was penalized for swearing in his defeat to Juan Martin Del Potro of Argentina.

Federer received the code violation in the third set of his match against Sandgren when a lineswoman reported Federer to the umpire, Marijana Veljovic, who issued the warning.

Federer told reporters on Tuesday that he had sworn in "a mix of languages."

"Clearly she speaks mixed," he said of the lineswoman. "Didn't know that. Next time I got to check the linespeople."

Federer, 38, said he understood the rules but that one transgression in five matches was not a bad ratio.

"Honestly, to be frustrated at one point for over, I don't know, 15 hours ... I think it's normal," he said. "I found it a bit tough. It's not like I'm known to throw around words and whatever. It's not like the whole stadium heard it either. But no problem, I'll accept it."

Federer's fine is not the biggest at the Australian Open so far this year. That honor goes to Benoit Paire of France, who was fined $7,500 for unsportsmanlike conduct during his first-round doubles match.

All fines received at the Grand Slam events go to the Grand Slam Development Fund, which encourages the development of tennis in emerging countries all over the world.