The statistics office said on Thursday that the economic impact of the coronavirus crisis had been concentrated in the April-June quarter, with restrictions on travel hitting the key tourism sector especially hard.
"Although Kenya was somehow spared the severe effects of the COVID-19 pandemic in the first quarter of 2020, the country bore the brunt of the disease in the second quarter," it said.
Its report had been delayed for two weeks because of disruptions related to the pandemic.
The 5.7% second-quarter contraction compared with a 5.3% expansion in the same period a year before.
Kenya's last quarterly contraction, of 1.6%, was recorded in the third quarter of 2008, the statistics office told Reuters.
Output in accommodation and food services, which covers tourism, contracted by 83.3% in April-June compared with a 12.1% expansion a year earlier. Transportation and storage shrank by 11.6%, after growing 7.6% in Q2 2019.
The drop in output was partly offset by growth in farming and financial services, which expanded by 6.4% and 4.2% respectively.
"It is a sharper downturn that we might have expected," said Razia Khan, head of research for Africa at Standard Chartered in London. A recovery has begun but is likely to be modest, she said.
The government started lifting coronavirus restrictions including a ban on international flights in July.
The central bank expects Kenya's economy to grow by 3.1% this year, which is by far the most optimistic projection.
The ministry of finance expects growth of less than 2.5%, and international institutions are making lower forecasts.
(Editing by Catherine Evans)
By Duncan Miriri and Omar Mohammed