Brazil had been struggling for years to decide which company to choose for a $4 billion-plus fighter jet contract, one of the world's most sought-after defense deals and one that would help define the country's strategic alliances for decades to come.
But Rousseff, the leftist president known for being sometimes gruff and even standoffish with foreign leaders, was thrilled after a 90-minute meeting in Brasilia on May 31 with U.S. Vice President Joe Biden.
After Biden's reassurances that the United States would not block crucial transfers of technological know-how to Brazil if it bought the jets, she was closer than ever to selecting Chicago-based Boeing to supply its fighter, the F/A-18 Super Hornet.
"She's ready to sign on the dotted line," one of her senior aides told Reuters at the time. "This is going to happen soon."
And then along came Edward Snowden.
On Wednesday, she surprised the defense and diplomatic worlds by tapping Sweden's Saab to supply the jets, a move aides said was made in part as a deliberate snub to the United States.
The decision was one of the biggest and most expensive consequences yet of the NSA revelations, which have strained Washington's relations with countries around the world.
A former guerrilla who had fought a U.S.-backed military dictatorship in the 1960s, Rousseff had spent the first two years of her presidency edging closer to Washington, fending off pressure from leftist elements of her Workers' Party and scheduling a rare state visit to the White House for last October.
Snowden's documents, many of which were published by Brazil-based U.S. journalist Glenn Greenwald, revealed that Washington had spied on Rousseff's personal communications, those of state-run oil company Petrobras - which Rousseff once chaired - and countless Brazilian citizens.
Rousseff could not understand why Washington would spy on an ally with no history of international terrorism, aides said. She reacted by canceling her White House trip, despite attempts by U.S. President Barack Obama to ease her concerns, including a one-on-one meeting on the sidelines of a G20 meeting in Russia.
This week, she made a decision she believed would hit the United States where it hurt most - its pocketbook.