SÃO PAULO—Brazil's economy shrank less than expected in the first quarter as the country's agricultural and mining sectors grew rapidly.

Gross domestic product contracted 0.2% in the first quarter from the last quarter of 2014, the Brazil's statistics agency said Friday. GDP shrank 1.6% from the first quarter of last year.

The median forecast of 16 economists surveyed by The Wall Street Journal was for a contraction of 0.5% in the first quarter from the fourth quarter.

The better-than-expected result is small relief for President Dilma Rousseff, who faces a year of weak economic growth and probably a recession amid high interest rates, high inflation, tax increases and unpopular budget cuts.

Brazil is one of the world's agricultural superpowers, and the sector outperformed the rest of the economy in the first quarter with an expansion of 4.7% from the fourth quarter of last year and 4% from a year earlier.

Mining and petroleum were another bright spot, with an expansion of 3.3% from the previous three months.

Mining giant Vale SA posted record iron ore production in the first quarter, and state-controlled oil company Petroleo Brasileiro SA, or Petrobras, also increased output.

Ms. Rousseff's efforts to cut the government's budget deficit led to a decline of 1.3% in government spending in the first quarter, and consumers cut back as well, spending 1.5% less compared with the fourth quarter of 2014.

Write to Jeffrey T. Lewis at jeffrey.lewis@wsj.com

Access Investor Kit for Vale SA

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=BRVALEACNOR0

Access Investor Kit for Vale SA

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=BRVALEACNPA3

Access Investor Kit for Vale SA

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US91912E1055

Access Investor Kit for Vale SA

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US91912E2046

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

Vale (NYSE:VALE)
Historical Stock Chart
From Feb 2024 to Mar 2024 Click Here for more Vale Charts.
Vale (NYSE:VALE)
Historical Stock Chart
From Mar 2023 to Mar 2024 Click Here for more Vale Charts.