Rio de Janeiro's Carnival was heading towards its climax Sunday with the famed parades about to kick off in heatwave conditions -- but also with a few party-pooping problems.
The shooting of a Dutch tourist by a mugger, new restrictions stopping the millions of revellers using the street as a toilet, and controversy over the inclusion of a seven-year-old girl as a sexy samba queen all posed challenges as Rio authorities tried to manage the image of what they called "The Biggest Party on Earth."
Their concern was especially sharp this year because of Rio's recently won status as host of the 2016 Olympic Games.
"This is the first Carnival in the Olympic city, which has a fantastic image across the world," Rio mayor Eduardo Paes said Friday as he opened the festivities that officially run to Wednesday, and unofficially for days after that.
An estimated 500,000 to 700,000 foreign tourists are in town to take part, many of them fleeing snowy winter conditions in Europe and the United States.
They were enjoying temperatures over 40 degrees Celsius (104 degrees Fahrenheit) -- the hottest heatwave in 50 years in the city, which made any clothing other than shorts or bikinis superfluous.
Several, though, found themselves victims of Rio's endemic crime.
The worst case was that of a 37-year-old Dutch tourist who was shot twice by a mugger who assaulted him and his wife Friday as they walked to the top of the hill where Rio's landmark giant Christ the Redeemer statue is located.
The Dutchman, Alexander Kors Johannes Vervoort, remains in intensive care in a Rio hospital. His wife, also 37, was beaten about the head with a pistol but otherwise unhurt.
"This is the worst crime we have had against a foreign tourist this year and we are worried about it," the head of the special tourist police unit handling the assault, Gilbert Stivanello, said.
Police were hunting the mugger, who was said to also be at risk of being murdered by the drug gang in his neighborhood which was unhappy with him causing officers to raid its lawless slum.
For officials, the incident next to the Christ statue -- Brazil's most-touristed site with 1.8 million visitors a year -- marred determined efforts to portray the city as a safe venue for the 2016 Olympics, and the 2014 football (soccer) World Cup.
A dozen other individual tourists, most of them British backpackers, told AFP at the tourist police station they, too, had been mugged during Carnival, though none had been hurt.
Police said they would not have Carnival crime statistics available before Friday.
Rio's authorities, though, have clamped down on the street partying this year in other ways in a bid to clean up the city's image.
More than 100 people have been arrested for urinating in the street, usually near massive street parties where beer and music flow for hours. Most were men, though three women were also apprehended.
Meanwhile, the world-famous parades were attracting extra attention. The top-notch events were to be held all night long Sunday and Monday in front of a 90,000-strong stadium crowd.
Many Brazilian and a handful of international celebrities were in the city to watch, among them Madonna, Australian actor Hugh Jackman and famous-for-being-famous Paris Hilton.
But the inclusion of a young girl, Julia Lira, in the role of samba queen has sparked controversy.
The seven-year-old daughter of the head of the Viradouro school that she is dancing for will be competing against the samba queens of the 11 other schools in the competitive parades -- all of them near-naked women in little more than a g-string and body glitter who inject trademark sexiness into the show.
Viradouro has promised Julia will not be provocatively dressed, but even so, it had to see off a legal challenge by a children rights group. A Rio judge last Tuesday finally gave authorization for her to take part.
While Lira is the youngest samba queen of a major samba school, she is not the first young girl in the role; a rival school successfully entered a 12-year-old as its samba queen six years ago.