Riot and mounted police were called in to keep demonstrators from getting too close to the stadium as thousands of fans arrived for the inaugural match in the nation's capital. The protesters started chanting and marching about a mile away from the venue.
Tear gas bombs were thrown by the police and pepper spray was used to try to control the protesters as they moved near the venue. Local media said police later shot rubber bullets to disperse the crowd and at least two people were injured, including a 16-year-old student. Authorities said 15 people were arrested.
The match was not disrupted by the protest and Brazil won 3-0 in front of a crowd of 67,423 people.
The protesters shouted against the local government and carried banners saying that too much money was being spent on the Confederations Cup and next year's World Cup while the majority of the population continued to struggle.
"We are demanding more respect to the population," said 21-year-old Vinicius de Assis, one of the protesters. "They are building these overpriced stadiums and are not worrying about the situation of their own people."
The demonstrators also shouted against FIFA, saying that soccer's governing body doesn't have the right to make demands on the Brazilian government.
The protesters also said they are being excluded from the tournaments because of the high prices of match tickets.
"This is a shame, this is our money that they used for these tournaments," said demonstrator Jaisson Peres. "Millions and millions spent and we don't get anything in return."
They held banners and signs reading "Health? Education? No! Here everything is for the World Cup."
"I'm upset that all public money for construction, hospitals and schools is being used to build stadiums without any utility," said student Ana Leticia Ribeiro. "After the World Cup, no one will use this."
The stadium in Brasilia was one of the most expensive of the six built ahead of the World Cup warm-up tournament, costing about $600 million.
The local government initially said that only about 200 demonstrators participated in the protest. It said in a statement that police used "progressive force" to keep the protest under control but said they would take action if needed to keep the demonstrators away from the stadium.
"Authorities will not allow any disturbance of public order or any threats against the match," the government said. "It's guaranteed that fans have complete access to the stadium."
There have been violent protests in Sao Paulo and Rio de Janeiro these past weeks as thousands of demonstrators complained of rising bus and subway fares. The protesters in Brasilia said they had no intention of vandalizing any public property.
FIFA on Friday expressed "full confidence" that Brazilian authorities have shown they can manage disorder in the streets.
The Brazilian government said 54,000 security officers are involved in implementing the security plan designed for the warm-up competition. The national defense contingent relies on 20,000 security officers in the host cities, including more than 1,000 military personnel specialized in combating terrorism.
Follow Tales Azzoni at http://twitter.com/tazzoni