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. In the fourth quarter, the economy expanded a revised 0.4% from the third quarter and 1.1% from a year earlier.

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.

A lack of coordination between state and federal governments is making the situation even worse, Andre Perfeito, chief economist at the Necton brokerage in Sao Paulo, said. President Jair Bolsonaro is pressuring state governors to let businesses reopen even while the number of new cases of the illness is rising, which could mean businesses will have to close again.

"They're unleashing the economy while the pandemic is getting worse, so it looks like we'll return to quarantines again later this year," Mr. Perfeito said, adding that employment figures for April showed a sharp decline in family income. "Investment is going to collapse and consumer spending will be bad again."

Mr. Perfeito forecasts a 9% contraction in the second quarter from the first.

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 based on criteria including hospital occupancy levels and the trend in new cases.

The biggest impact in the first quarter came from a 1.6% contraction of the service sector, which represents 74% of Brazil's GDP, according to the IBGE. Consumer spending declined 2%.

"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.

The industrial sector was also hit, with a 1.4% decline in the period. Mercedes-Benz, which makes cars, trucks and buses in Brazil, expects the truck market to shrink by at least 30% this year, and it could be worse depending on how long social distancing measures are in place, said Philipp Schiemer, president of Mercedes-Benz do Brasil.

"I hope there will be a stimulus for the economy, this is necessary, because even if things improve on the health side, there will be a lack of confidence among investors and consumers," Mr. Schiemer, who's in charge of the company's trucks and buses division, 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