* 27 leaders met two weeks before European Parliament elections

* Vow unity 'through thick and thin' after Brexit divorce

* Focus on climate, rule of law, security and modern growth

* Race starts for five top EU jobs up for grabs later this year (Updates after summit ends)

By Gabriela Baczynska and Luiza Ilie

SIBIU, Romania, May 9 (Reuters) - Fighting climate change, safeguarding the rule of law and finding a modern model for growth must be at the heart of the European Union, the bloc's leaders agreed in Thursday talks meant to show unity despite the damage from Brexit.

However, their informal gathering in the Romanian town of Sibiu did not produce clear decisions on how to achieve the ambitious goals, underscoring divisions in the EU along multiple fault lines and setting up battles ahead.

The leaders of all members except Britain met on Europe Day in Sibiu, which has German and Hungarian roots, 15 years after the EU's expansion east finally consigned to history the Iron Curtain that had divided Europe since World War Two.

Ahead of European Parliament elections on May 23-26, the 27 leaders also had a first look at assigning the bloc's most powerful jobs later this year.

"In 15 days, some 400 million Europeans will choose between a project ... to build Europe further or a project to destroy, deconstruct Europe and return to nationalism," Macron told the gathering.

"Climate, protection of borders and a model of growth, a social model... is what I really want for the coming years."

On climage change, France and eight other EU countries proposed getting to "net-zero greenhouse gas emissions" by 2050 and the bloc will now fight about how to frame and finance any transition to more environmentally-friendly policies.

"Nothing has changed when it comes to divides and different opinions about it," said the chairman of the talks, European Council President Donald Tusk who used to be the prime minister of Poland, one of the biggest EU stallers on climate reforms.

"What is new is this very fresh and energetic pressure," he said of youth protests growing in Europe to demand radical action to safeguard the planet. "There is no future for politicians without this sensitivity and imagination."

German Chancellor Angela Merkel, mindful of her country's powerful car industry, refused to endorse the French-led proposal entirely but backed spending a quarter of the EU's next joint budget for 2021-28 on climate and energy efficiency.

A report released on Thursday by the World Wide Fund (WWF) and Global Footprint Network sharply criticised the EU, saying its members consumed the Earth's resources faster than they can be renewed.

The leaders pledged to protect the rule of law at a time when the governments in post-communist members Poland, Hungary and Romania stand accused of undercutting democracy.

Divided over issues ranging from democratic standards to migration, the EU is grappling with the prospect of Britain's departure, a wave of populism, and external challenges from China to Russia to the United States.

It is also lagging behind in areas from artificial intelligence to cyber security, and is scrambling to keep alive a troubled nuclear deal with Iran.

But the leaders signed off on a declaration promising to "defend one Europe", "stay united, through thick and thin" and "always look for joint solutions" ahead.

TOP JOBS UP FOR GRABS

Tusk announced another summit on May 28, two days after the European Parliament vote, to let the national leaders agree on appointing new people to hold the EU's top roles until 2024.

This will involve fierce horse-trading over names to head the European Council, which brings together national leaders, the executive European Commission, the European Parliament, the European Central Bank and the joint diplomatic service.

All five posts are up for grabs later this year and the outgoing European Parliament has already picked its favourites for the Commission job including a conservative German, Manfred Weber, and a Dutch socialist, Frans Timmermans.

Many national leaders, however, want to keep control of the opaque process to themselves.

Agreement on top roles took three summits the last time round but Tusk said he wanted the new leadership in place in July and was ready to go for a majority vote if unanimity was missing.

Hungary's eurosceptic Prime Minister Viktor Orban and Greek Prime Minister Alexis Tsipras spoke against Weber.

He did, however, get the backing of Merkel and Austrian Chancellor Sebastian Kurz. Macron, the leaders of Luxembourg and Lithuania opposed the idea of following the parliament's choice.

Other names in the hat include Brexit negotiator Frenchman Michel Barnier, or Margrethe Vestager, Denmark's current commissioner who imposed hefty fines on global tech giants Google and Apple. (Reporting by Luiza Ilie, Gabriela Baczynska, Andreas Rinke in Sibiu, Jan Strupczewski and Philip Blenkinsop in Brussels, Michel Rose in Paris and Michael Nienaber in Berlin Writing by Gabriela Baczynska Editing by Hugh Lawson, Angus MacSwan and Frances Kerry)

Our Standards: The Thomson Reuters Trust Principles.