(CNN) With the Olympics set to begin in less than three months in Rio de Janeiro, one of Brazil's most successful soccer players has a surprisingly ominous message for international visitors: Stay away.

Brazil is getting "more ugly," said Rivaldo, who was on the country's 2002 World Cup-winning squad, forming part of a lethal attacking trio with Ronaldo and Ronaldinho.

Rivaldo warned people on social media about the violence plaguing the city, citing the killing of a 17-year-old girl over the weekend.

The message is likely to frustrate the country's leaders, who have been trying to dispel the notion that Brazil is not ready for the games and Rio is not safe for tourists.

Read More