But the choice of Julia Lira to lead the drum corps for the Viradouro samba group has sparked controversy and a legal challenge by a children's rights group who said she risked being sexually exploited.

The final word was left to a family court judge, who ruled on Wednesday she could join the parade.

If allowed, Lira will dance through the Sambadrome stadium after midnight on Sunday cheered by thousands of fans and celebrities expected to include Madonna, who has been pictured in Rio with her 22-year-old Brazilian boyfriend.

US R&B stars Beyonce and Alicia Keys are also in Brazil to take part in the festival of hedonism before Lent that is thought to have its roots in pre-Christian spring festivals.

The two donned feathered carnival costumes to shoot a music video in a Rio slum on Tuesday and Beyonce opened the celebrations in Salvador on Wednesday night.

But it is the much younger diva who has been dominating the pre-carnival headlines.

The selection of a tiny girl in a role usually occupied by scantily clad, high-heeled models has sparked a heated debate, with critics saying she is too young to star in the gruelling, sexually charged parade.

Julia's father Marco Lira, who is also president of Viradouro, has defended her selection, saying she will wear an outfit designed for children.

"No father wants to expose his daughter. She will parade because she deserves it," he said.