Roger Federer has been fined $3,000 for using an audible obscenity during his Australian Open quarter-final victory over American Tennys Sandgren.

The Swiss was handed a code violation for swearing in the third set of Tuesday’s match after the lineswoman reported Federer to Serbian chair umpire Marijana Veljovic.

Federer clarified in his post-match news conference that he had sworn in “a mix” of languages and said he was frustrated by the way he received the on-court warning.

“Clearly she speaks mixed. Didn’t know that. Next time I got to check the (language skills of the) lines-people,” the 20-times Grand Slam champion said.

“Honestly, to be frustrated at one point… I think it’s normal.

“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.”

Federer went on to save seven match points against Sandgren before winning in five sets to set up a semi-final clash with defending champion Novak Djokovic.