By Jeffrey T. Lewis

SAO PAULO--Brazil's gross domestic product contracted in the first quarter as an already weak economy was hit late in the period by the social distancing measures implemented in the country amid the coronavirus pandemic.

Gross domestic product contracted 1.5% in the first quarter from the fourth quarter and shrank 0.3% from a year earlier, the Brazilian Institute of Geography and Statistics, or IBGE, said Friday.

Economists were already trimming their forecasts for GDP growth in 2020 before many Brazilian states began to order non-essential businesses and activities to shut down toward the end of March. The first quarter figures only capture a small part of the effects of the quarantine period, which in some states will last into June, and the second quarter will be worse, economists say.

"Then we'll have almost a whole quarter with the measures in place," Carlos Pedroso, senior economist at Banco MUFG Brasil in Sao Paulo, said.

In Sao Paulo, Brazil's most populous state and home to much of the country's financial and manufacturing sectors, Governor Joao Doria said earlier this week that some businesses and activities will be able to resume starting June 1 in areas where efforts to control the pandemic are showing signs of success.

The biggest impact in the first quarter came from a 1.6% contraction of the service sector, which represents 74% of Brazil's GDP. Consumer spending declined 2% and manufacturing shrank 1.4% in the period.

"In Brazil, we're seeing the same thing that other countries affected by the pandemic are seeing, which was a decline in services aimed at families because of the closing of businesses," Rebeca Palis, the IBGE's GDP coordinator, said.

Agriculture grew 0.6% in the quarter and government spending increased 0.2%. Gross fixed capital formation, a measure of investment spending, grew 3.1% in the quarter.

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