(Updates crowd estimates, adds government response)
By Paulo Prada
RIO DE JANEIRO, March 15 (Reuters) - Close to a million demonstrators marched in cities and towns across Brazil on Sunday to protest a sluggish economy, rising prices and corruption - and to call for the impeachment of left-wing President Dilma Rousseff.
The protests in the continent-sized country come as Brazil struggles to overcome economic and political malaise and pick up the pieces of a boom that crumbled about the time Rousseff took office in 2011.
Rousseff, now early into her second four-year term, is unlikely to face the impeachment proceedings called for by many opponents. A fifth year of economic stagnation and a multibillion-dollar corruption scandal at state-run energy company Petroleo Brasileiro SA, or Petrobras, has fueled their anger.
But for a president narrowly re-elected just five months ago, the protests are a sign of a polarized country increasingly unhappy with its leadership, especially as the hard-won gains of the recent boom begin to succumb to an economic slowdown.
The unexpectedly large demonstrations also promise to embolden opposition parties and restive allies, including the leaders of both houses of Congress, who are nominally part of Rousseff's ruling coalition, but nonetheless are hindering efforts to pass reforms intended to jump-start the economy.
In a press conference Sunday night, two members of Rousseff's cabinet recognized the rights of protesters, but downplayed the importance of the demonstrations, saying they were expressions of discontent by those defeated at the polls.
They also sought to discredit those who suggest impeachment. Miguel Rossetto, one of Rousseff's top aides, criticized what he called the "intolerance" of those opponents and likened their demands to coup efforts.
In a statement posted online Sunday, Aecio Neves, a centrist who was defeated by Rousseff in October, said the demonstrations marked a day when Brazilians "went to the streets to reunite with their virtues, their values and also with their dreams."
Sunday's gatherings were mostly calm, with little of the violence that tarnished a wave of massive demonstrations in 2013, when Brazilians protested billions of dollars of spending, even as the economy faltered, to host the 2014 World Cup.
But if less vehement, the rallies Sunday possibly matched those of two years ago in scale. Estimates for the size of the crowds differed, but most calculations suggested roughly a million protesters nationwide.
In Sao Paulo alone, state police in late afternoon said that a million had turned out to march along skyscraper-lined Avenida Paulista, the heart of Brazil's financial capital and biggest city. A private pollster later said it was only 210,000.
Earlier, more than 10,000 residents of Rio de Janeiro poured onto the Copacabana waterfront. Most dressed in the blue, green and yellow of Brazil's flag. Crowds sang the national anthem and shouted "Dilma, out!"
"People feel betrayed, said Diogo Ortiz, a 32-year-old advertising worker, who called the Petrobras scandal "a national and international disgrace."
Many protesters hail from the country's wealthier classes, who traditionally have opposed the ruling Workers' Party.
Underscoring class divisions, marchers said Rousseff and the ruling party have instigated the polarization by pitting their traditional supporters, the recipients of popular social welfare programs, against the rest of Brazil.
The party "is inciting the people against the people," said Helena Alameda Prado Bastos, a 61-year-old editor in Sao Paulo.
The Workers' Party, opponents complain, for too long ignored critiques that its heavy spending, subsidized lending, protectionist policies and corruption have sapped the vitality that led to average growth exceeding 4 percent during the decade before she took office.
Although the party also presided over those good years, during two terms of Rousseff's predecessor, economists say she failed to adjust policies when a global commodities boom ended and sapped once-soaring export revenue.
Rousseff herself has not been accused of wrongdoing in the corruption probe, but many blame her for lax oversight of Petrobras, especially during years she served as the company's chairwoman, prior to becoming president.
The ongoing scandal stems from a scheme through which prosecutors say Petrobras contractors paid kickbacks to corrupt executives and some Workers' Party members.
So grim are Brazil's economic prospects that many economists expect it to slip into recession. Investors, meanwhile, fear the country could lose its investment-grade status.
Inflation is running at a 10-year high, while Brazil's currency, the real, has lost over 22 percent of its value against the dollar this year. (Additional reporting by Caroline Stauffer, Pedro Fonseca, Anthony Boadle and Maria Carolina Marcello; Editing by Eric Walsh)