German carmakers became more optimistic about their prospects for production and exports in May, a survey by the Ifo economic institute showed on Wednesday, a ray of hope for the sector that has been hit hard by the coronavirus pandemic.

The index for export expectations rose to -9.8 from -65.3 in April while the index for production expectations increased to 22.7 from -41.5.

But Ifo warned that the sector remained pessimistic overall, with carmakers feeling more downbeat about the current business conditions than they did during the 2009 global financial crisis.

(Reporting by Michelle Martin; editing by Thomas Seythal)