A star-struck tennis fan was brought to tears the moment she got to meet Roger Federer.

Lily, 10, was overcome with emotion as she came out to participate in the coin toss before a match in Perth.

The former world number one was competing in a Hopman Cup mixed doubles game with Swiss partner Belinda Bencic against Germany.

"Are you very nervous to meet Roger?" Germany's Alexander Zverev asked as he came up to the net. “He’s a very nice guy, so don’t be shy, don’t cry.”

Zverev had beaten Federer in three sets earlier that day in their singles tie.

The umpire eventually stepped in to usher things along: “Lily, I guess we know the answer, but who do you want to ask [to choose heads or tails]?”

After picking the Swiss, Federer asked Lily which they should choose – heads – which she guessed correctly.

“Yes! Good job! We won something today, we will serve,” said Federer.