The measure would have forced the new conservative local government to invest heavily in renewable energy, building efficiency and public transport.

Had it passed, Berlin would have been one of the few major European cities with a legally binding goal to become carbon neutral in seven years.

The result "shows that the majority of Berliners also see that the demands of the referendum could not have been implemented - not even if they were cast into law," Giffey said.

The European Union last year started a scheme to help 100 cities inside and outside of the bloc become climate neutral by 2030, but the scheme and the financial support it offers are not legally binding.

The referendum was a test of whether Germans, or at least Berliners, want Germany's climate policy, which now aims to make Europe's biggest economy carbon-neutral by 2045, to be more ambitious.

Climate activists who initiated the vote said the government's target was too far in the future to prevent global warming from exceeding 1.5 degrees Celsius.

"At the moment, climate policy is simply not sufficient to ensure a future worth living in our city," Jessamine Davis, a spokesperson for Climate New Start Berlin, said.

Unlike Berlin's previous referendums - including one calling for expropriation of large landlords or one on keeping the former Tempelhof airport free from development - Sunday's climate referendum would have been legally binding on the government in Berlin.

The referendum came as Germany's conservative CDU party is negotiating a possible coalition with the Social Democrats in the city after its clear victory in a repeat election, driving the environmentalist Greens into opposition.

In addition to a majority of positive votes, the initiative needed at least 608,000 "Yes" votes to make the results binding.

But by 20:40 p.m. (1840 GMT), there were just under 441,000 votes in favour.

As a city of four million, with few renewable energy sources nearby or geothermal heating, Berlin lacks what is necessary to make that target more achievable, said Bernd Hirschl from Berlin's Institute for Ecological Economy Research.

Still, the referendum was a way to revive the debate over climate policy and the changes people must accept to reach climate neutrality regardless of the deadlines, Hirschl told Reuters.

"Because it's not about 2030. It's about the question of whether we want to send a signal to politicians or not," he added.

(Reporting by Riham Alkousaa; Additional reporting by Tom Sims; Editing by Tomasz Janowski and David Holmes)

By Riham Alkousaa