The Ibovespa gained 0.7% to close at 174,070 on Friday as investors assessed May industrial production and June services PMI data.

The S&P Global Services PMI showed the sector expanded at a slightly faster pace in June as demand improved, supporting domestically oriented stocks.

Retail shares led gains, with Ultrapar rising 3.5% and Magazine Luiza advancing 4.2%.

Financial stocks also moved higher, with Itaúsa adding 0.7% and B3 gaining 1%.

Meanwhile, oil prices remained near pre-conflict levels amid optimism over US-Iran peace efforts, easing concerns about energy-driven inflation.

Petrobras rose 0.8% despite lower crude prices after inaugurating the Pre-Salt Technology Center, a semi-industrial-scale research facility built with R$300 million in funding.

Meanwhile, industrial production rose just 0.2% year-on-year in May, well below forecasts of a 1.3% increase.

Investors also monitored the US decision to launch a public consultation on Brazil's trade policies and practices.