The head of the IMF encouraged Brazil Thursday to pursue fiscal discipline, saying it was needed to protect social programs benefitting the poorest members of society.
Christine Lagarde, the IMF chief, made the link during a visit to Complexo do Alemao, one of Rio's largest and most dangerous slums, and a visible example of the challenges facing Brazil as it struggles with low growth and high inflation.
She chatted with a group of women, who had received government aid and training that enabled them to open small businesses in Complexo do Alemao and other favelas in Rio.
"Fiscal discipline is the necessary basis for financing programs like these," Lagarde said. "They go together, they go hand in hand."
"The people who suffer the most with fiscal indiscipline at the end of the day are generally the poor."
The IMF earlier this year urged Brazil to "strengthen the credibility of economic policy."
The world's seventh largest economy has endured four years of slow growth and this year the IMF predicts a 1.0 percent contraction amid rising inflation.
It is now cutting back spending with a goal of producing a surplus of 1.2 percent of GDP.
Some 60,000 people live in the Complexo do Alemao, grouping 15 favelas where residents often have to run the gauntlet during shootouts between police and drug traffickers.
As well as offering economic advice, Lagarde watched a demonstration of capoeira, an Afro-Brazilian martial art comprising elements of dance and visited a center where locals sign on to the Bolsa Familia family assistance program.
The government-financed scheme and other social programs are credited with lifting tens of millions of Brazilian families out of absolute poverty over the past decade.
To obtain the stipend families must ensure that their children attend school and participate in vaccine programs.
Lagarde saluted the Bolsa Familia scheme as having produced "absolutely exceptional" results.
"The fact that Brazil spends 0.5 percent of GDP on the fight against poverty via its Bolsa Familia is remarkable," she told reporters.
Lagarde was due to hold talks with Brazilian Finance Minister Joaquim Levy as well as President Dilma Rousseff in the capital Brasilia.
On Friday, she will participate in a seminar hosted by Brazil's central bank in Rio and hold a press conference thereafter.
Overnight, just hours before Lagarde arrived, shots were fired in Alemao, halting the gondola service and leaving residents to bemoan a regular backdrop to their daily lives.
"The violence continues. Innocent people are dying" from stray bullets, resident Madalena Alves de Assis told AFP.
A jobless single mother of three, de Assis survives on $83 in government handouts per month.