BRASILIA (Reuters) - Police used teargas to contain protests against political corruption on Saturday in several Brazilian cities, where demonstrators failed to disrupt Independence Day military parades.

The protests were much smaller than the massive demonstrations that shook Brazil in June, when hundreds of thousands took to the streets in a sudden outburst of anger against the country's political class for mismanaging public funds and failing to provide adequate public services.

In downtown Rio de Janeiro, some 500 protesters invaded stands in the parade area, sending frightened families with children rushing for safety. Police used teargas and stun guns to disperse the demonstrators, who did not interrupt the parade.

"It was frightening. There was a wave of masked demonstrators dressed in black," said Rosangela Silva, who took a niece to watch the parade.

In Brasilia, police used pepper spray to hold back a peaceful crowd of more than 1,000 demonstrators who marched to Brazil's Congress to demand the ouster of corrupt politicians.

Protesters were only allowed to march along the wide esplanade of Brazil's capital after the annual Independence Day military parade led by President Dilma Rousseff had ended.

Organizers said many people who had intended to join the demonstrations did not come due to the heavy police presence and the prospect of violence seen in recent clashes in Sao Paulo and Rio de Janeiro, where hooded youths have become the main protagonists of recent protests.

Police arrested groups of youths found with hoods, stones and slingshots in their backpacks in the cities of Curitiba and Fortaleza, where parades went ahead without incidents.

Demonstrators later moved toward Brasilia's brand-new $600 million soccer stadium where the Brazilian national team was to play against Australia later on Saturday in a practice game for next year's World Cup, which Brazil will host.

Riot police used police dogs and fired barrages of teargas to stop the demonstrators from reaching the stadium.

More than 1 million people took to the streets of Brazil's cities in June, initially sparked by outrage at an increase in bus and subway fares. The protests quickly transformed into a nationwide movement against bad public services, the rising cost of living, corruption and a host of other complaints, including anger over the $14 billion Brazil will spend on the World Cup.

While the protest targeted politicians of all parties, Rousseff's popularity plummeted shortly thereafter, clouding her chances for next year's election in which she is widely expected to run.

In response, Rousseff pledged to improve urban transport, health and education in Brazil while proposing reforms to make Brazil's political system more accountable. Her popularity has begun to recover in recent opinion polls.

(Reporting by Anthony Boadle in Brasilia, Pedro Fonseca in Rio de Janeiro and Asher Levine in Sao Paulo; Editing by Eric Beech)