FORTALEZA, Brazil — The historic wave of protests that has swept across Brazil in recent days has gained some important allies — the players of the Brazilian national football team.

Brazil is hosting the Confederations Cup, a tournament of continental champions that serves as a warm-up for next year's World Cup. But the Brazilian players' focus has turned to the demonstrations that call for improvements in basic services such as public transportation, schools and hospitals.

The Brazilian players were reluctant to speak about the demonstrations at first, but it became difficult to avoid after hundreds of thousands of protesters took to the streets to show their displeasure with politicians, authorities and local government.

"After seeing the people on the streets claiming for improvements, it makes me feel like joining them," Brazil striker Hulk said. "They are doing the right thing, what they are saying makes sense and we have to hear them. Brazil needs to improve, we all know that."

Nearly 240,000 people marched in 10 Brazilian cities on Monday. The protests are turning into the most significant demonstrations in Brazil since the end of the country's 1964-85 military dictatorship, when crowds rallied to demand the return of democracy. It's reminiscent of the early 1990s nationwide movement to call for the impeachment of then-president Fernando Collor de Melo following corruption allegations and unpopular economic measures.

"The people have the right to express their opinions and to protest when they are not happy with what is happening in their country. That's the only way to call attention to what is wrong," said Brazil defender David Luiz, who plays for Chelsea in England. "I don't live in Brazil, but I love my country. The Brazilians love their country and that's why these protests are happening."

The players got behind the demonstrators even though some of the complaints are related to the high costs of hosting the Confederations Cup and the World Cup in a country in dire need of better public services for its general population.

An organization calling for lower bus fares initiated the protesting last week, but demonstrations have expanded as people experience the burden of high taxes and high prices but receiving low-quality services in a system of government rife with corruption and inefficiency.

Protesters have tried to use the Confederations Cup to attract attention to their causes, organizing several demonstrations before matches in the six host cites.

The protests turned violent in Brasilia, Rio de Janeiro and Belo Horizonte, with police using rubber bullets and tear gas to keep the demonstrators from disrupting fans trying to get to the matches. Authorities reported arrests and minor injuries in the three major cities.

"The only thing we won't support is violence," Luiz said. "I'm in favor of the right to express your opinion, but only if it's done peacefully."

The players had been avoiding the protests in news conferences, apparently trying to keep the issue from distracting the team's preparations. But some had already gone to social media sites to offer their opinion.

"I'm in favor of the protests as long as they are peaceful," Brazil striker Fred said on Facebook. "I'm very proud to see the people fighting to improve public transportation, health services and so many other things."

Barcelona defender Daniel Alves and Bayern Munich defender Dante also expressed their support to the demonstrations.

Coach Luiz Felipe Scolari had been saying that he was only worried about preparing his team for the tournament and would not comment on anything else. However, he talked Tuesday about the protests for the first time, praising his players for giving their support to the movement but saying that there is little the national team can add.

"Our job is to give fans motivation to celebrate by doing well on the field," he said. "It's all we can do."

Former Brazil player Juninho, a member of the 2006 World Cup team, suggested on his Facebook page that on Wednesday players sing the national anthem with their backs turned to the Brazilian flag to show that soccer is not more important than the Brazilian people. Others have said the fans should also turn their backs to the field when the anthem is played in the match against Mexico.

A protest was scheduled before the match at the Arena Castelao in the northeastern city of Fortaleza.