Brazilian President Dilma Rousseff had been experiencing a huge drop in her popularity this year, culminating in mass demonstrations over public spending and corruption. But she has found a way to regain the admiration of her people overnight, when she decided on Tuesday to cancel her visit to the White House in protest of the U.S. spying agency NSA snooping on her and other Brazilian officials.

Rousseff condemned the surveillance allegations, after Guardian journalist Glenn Greenwald revealed that the U.S. had spied on the Brazilian government and oil company, Petrobras (NYSE:PBR). The Brazilian leader asked for explanations from President Barack Obama in a phone conversation on Wednesday, but she said she was not satisfied with what she heard.

Rousseff announced on Tuesday that her visit to the White House, scheduled for Oct. 23, was canceled. This would have been the first official trip to Washington by a Brazilian leader in almost two decades.

The decision made headlines both in Brazil and outside. Fellow Brazilians are praising her strength of character and standing up for her country. “The visit would have been a hypocrisy after the espionage scandal,” wrote journalist Fabio Zanini in the Folha de São Paulo newspaper.

“[Brazil] really shouldn’t bend to the delusions of grandeur [of the U.S.], only another step in a journey of arrogance and political and economic intervention,” wrote columnist Jandira Feghali in Journal do Brasil. “Dilma did the right thing canceling the visit -- it was the least she could do.”

Reactions in the streets of São Paulo and Rio de Janeiro were equally enthusiastic. Rousseff's popularity rate plummeted during the social upheavals in June and July, but it has risen slightly since she demanded explanations from Obama: from 49 percent in July to 58 percent in early September, according to Brazilian polling firm MDA Consultores.

Not everybody is approving of Rousseff. The opposition said that the decision is just a political move, far from a reaffirmation of Brazil’s sovereignty. “Once again, the government ignores the real interests of Brazil and resorts to electoral marketing,” said Social Democratic Senator Aécio Neves to Brazilian newspaper O Globo.

British journalist Richard House, who follows Rousseff’s political career, agreed. “Rousseff needs a diplomatic success. However, I doubt this will be it,” he told the BBC.

Rousseff will still visit the U.S. on Sept. 24, when she is scheduled to address the United Nations. She is expected to include a mention of her decision in her speech, which will tackle the question of political espionage and the threat it poses to sovereignty.

The White House issued a statement on Tuesday, saying that the cancelation of the visit was the best decision given the delicate status of the relations between the U.S. and Brazil at this time. Press Secretary Jay Carney said that the visit would be postponed to an unknown date.

However, whatever the outcome of this event might be, Rousseff will be able to hold her head high in the next election, scheduled for October 2014. As journalist Juan Arias noted in Spanish newspaper El País, “Rousseff is not just the strong woman who won in 2010 -- she is also the candidate able to defend her country’s sovereignty.”