Hundreds of thousands of Brazilians have marched peacefully in more than 150 cities around the country to demand President Dilma Rousseff's impeachment and to criticise government corruption amid a sprawling graft inquiry at state-run oil firm Petrobras.

The biggest of the protests, held on the 30th anniversary of Brazil's return to democracy after a long military regime, took place in Sao Paulo, an opposition stronghold where some 210,000 gathered on a main avenue, according to the polling institute Datafolha, one of the only entities in Brazil that makes scientific crowd estimates.

Large rallies were also seen in the capital Brasilia, the southern city of Porto Alegre and in Rio de Janeiro.

"We are here to express our indignation with the government-sponsored corruption and thieving, and to demand Dilma's impeachment," said Andre Menezes, 35, protesting on Avenida Paulista in Sao Paulo.

"She may have not been directly involved in the corruption at Petrobras, but she certainly knew about it, and for me that makes her just as guilty and justifies her ouster," he added.

In Rio, police estimated 15,000 people marched along the golden sands of Copacabana beach, where they waved Brazilian flags and many openly called for a military coup to dissolve the government.

In contrast to the widespread violence seen during Brazil's 2013 protests, yesterday the only conflict reported was police using tear gas and stun grenades to disperse a small group of protesters in Brasilia who authorities said were trying to enter the Congress. In Sao Paulo, police arrested about 20 young men who were carrying powerful fireworks and brass knuckles.

Ms Rousseff did not appear in public, but her justice minister Jose Eduardo Cardozo went on national TV to hold an extensive live press conference defending the government.

He emphasised Ms Rousseff would soon propose a series of anti-corruption measures in Congress that were promised during her re-election campaign.

He also defended the leader's record as a leftist guerilla who stood up to Brazil's 1964-85 military regime - and who was jailed for three years and brutally tortured because of it.

Ms Rousseff has said she fully supports peaceful demonstrations, even those demanding her impeachment, and Mr Cardozo added that the rallies "confirm that Brazil is a democratic state that allows for divergences, the existence of opposing opinions and that we're far from any coup option".

Much protester ire was focused on a kickback the scheme at Petrobras, which prosecutors call the biggest corruption scandal ever uncovered in Brazil. At least £540 million was paid in bribes and other funds by the nation's biggest construction and engineering firms in exchange for inflated Petrobras contracts.

Top executives are already in jail and the attorney general is investigating dozens of congressmen, along with current and former members of the executive branch, for alleged connections to the scheme that apparently began in 1997 before Ms Rousseff's party took power in 2003.

Ms Rousseff, a former chairwoman of Petrobras' board, has not been implicated and so far is not being investigated, though top officials from her administration, including two former chiefs of staff, are caught up in the inquiry.

The marches add pressure on Ms Rousseff, whose poll ratings have never been lower and who is facing duel economic and political crises just three months into her second term.