BERLIN (Reuters) - The mood among German analysts and investors improved unexpectedly in June, reflecting their confidence in the resilience of Europe's largest economy despite an uncertain global backdrop, a survey by think tank ZEW showed on Tuesday.

Mannheim-based ZEW said its monthly survey showed a rise in its economic sentiment index to 19.2 points in June from 6.4 the previous month. That compared with the Reuters consensus forecast for a fall to 4.7.

"The improvement of economic sentiment indicates that the financial market experts have confidence in the resilience of the German economy," ZEW President Achim Wambach said in a statement.

"However, general economic conditions remain challenging. Apart from the weak global economic dynamics, it is mainly the EU referendum in Great Britain which causes uncertainty," he added.

A separate gauge of current conditions rose to 54.5 points from 53.1 in May. The Reuters consensus forecast was for a reading of 53.0. The ZEW index was based on a survey of 202 analysts and investors conducted June 6-20.

Barclays analysts said in a research note they took the ZEW survey with caution but that it was consistent with their main scenario for domestic consumption to drive the economy, with growth of around 0.5 percent in the second and third quarters.

The Finance Ministry and national central bank said on Monday German economic growth is likely to slow after a robust start to the year, expanding at a slower pace for the rest of 2016 as foreign trade cools.

Europe's largest economy grew 0.7 percent between January and March, its strongest quarterly rate in two years, as soaring private consumption, higher construction investment and state spending on migrants more than offset weak foreign trade.

The government expects domestic demand to drive an overall economic expansion of 1.7 percent in 2016, on a par with last year.

(Writing by Paul Carrel; Editing by Maria Sheahan/Jeremy Gaunt)