SYDNEY (AP) Australian Olympic swimming great Dawn Fraser ''unreservedly apologized'' on Tuesday for her comment that tennis stars Nick Kyrgios and Bernard Tomic should set a better example or go back to where ''their parents came from.''

Fraser, who won eight Olympic medals including four golds, was speaking in an interview on Australian television Tuesday, when asked about recent petulant behavior by Kyrgios and Tomic at Wimbledon.

The 77-year-old Fraser said ''they should be setting a better example for the younger generation of this great country of ours. If they don't like it, go back to where their fathers or their parents came from.''

Australia-born Kyrgios has a Greek-born father and Malaysian-born mother while Tomic was born in Germany to a Croatian father and Bosnian mother. Tomic's family migrated to Australia when he was 3.

Fraser's comments provoked a social media reaction and, after first defending herself against charges of bigotry, she later issued a statement apologizing to Kyrgios and Tomic.

''I want to unreservedly apologize for any comments that I made this morning which may have caused offense to my fellow Australians including Nick and his family,'' Fraser said in a statement issued Tuesday afternoon.

Fraser was asked whether she felt Kyrgios' behavior was the result of having too much money and fame too young. She agreed, saying ''we don't need them here in this country if they act like that.''

The 20-year-old Kyrgios responded in a Twitter post in which he described Fraser as a ''blatant racist, Australian legend.''

''Throwing a racket, brat. Debating the rules, disrespectful. Frustrated when competing, spoilt. Showing emotion, arrogant,'' he wrote.

Kyrgios's mother, Nill, said on Twitter ''I have no comments on Dawn Fraser's nasty racist attack...but she is out of line. (hash)unaustralianbehaviour.''

Australia's Race Discrimination Commissioner Tim Soutphommasane told the National Press Club ''contrary to what the likes of Dawn Fraser might say, most Australians do not tell migrants and their children to go back to where they came from.''

But Fraser at first strongly defended her comments.

''If you take (my comments) that way then I'm sorry that you take it that way, but I'm not racist at all,'' she told Fairfax Media. ''I said if they don't want to be Australians then maybe they should go back to the country where their parents come from. That's not being racist.

''I can see it being interpreted that way ... but it wasn't intended that way.''

Fraser's comments followed Kyrgios's fourth-round loss to Frenchman Richard Gasquet at Wimbledon on Monday. Kyrgios was booed by spectators when he appeared to make little attempt to return Gasquet's serve during the third game of the second set after a dispute with the chair umpire.

Though he fought back in the third set, Kyrgios went down 7-5, 6-1, 6-7 (7-9), 7-6 (8-6).

Kyrgios was forced to defend himself against allegations of `tanking' or not trying during his loss against Gasquet. His matches through the tournament included repeated instances of arguing with umpires.

Responding to a question, Fraser said ''it's absolutely disgusting. I am so shocked to think that he went out there to play and he tanked ...that's terrible.''

She then also mentioned Tomic, who had launched a scathing attack on Tennis Australia when he was eliminated earlier in the tournament. Both Tomic and Kyrgios have reputations for petulant behavior.

During her swimming career, Fraser also developed a reputation for unruly behavior. She was arrested for allegedly stealing a flag from outside the Imperial Palace in Tokyo during the 1964 Olympic Games but was later released without charge.

The Australian Swimming Union suspended Fraser for 10 years, but later overturned that decision.