Germany has agreed to form a climate and energy alliance with Morocco to support renewable energy expansion and hydrogen production in the north African country, the development ministry said on Friday.

Germany is seeking to expand its reliance on hydrogen as a future energy source to cut greenhouse emissions for highly polluting industrial sectors that cannot be electrified such as steel and chemicals.

Berlin will have to import up to 70% of its hydrogen demand in the future as Europe's largest economy aims to become climate-neutral by 2045, but it lacks the space and conditions for large wind and solar power production.

"Morocco has the best conditions for the energy transition and the production of green hydrogen. Germany wants to import hydrogen," Development Minister Svenja Schulze, who signed the alliance declaration with Moroccan Foreign Minister Nasser Bourita in Berlin, said in a statement.

Schulze said the new green hydrogen economy must be fair and unlike the fossil-based economy.

"We want to do this fairly and in partnership, so that Morocco can also drive forward its energy transition and get its fair share of the value chains of the future," she added.

Given the geographical proximity, Germany supports electricity trading cooperation between Morocco and the European Union and the participation of German technology companies and suppliers to advance the hydrogen economy there, Economy Ministry State Secretary Stefan Wenzel said.

The world's largest solar thermal power plant in the southern Moroccan city of Ouarzazate was built with Germany's support, the development ministry said, adding that Germany is also involved in building Morocco's first green hydrogen pilot plant.

The plant is expected to produce around 10,000 tonnes of hydrogen per year, enough to produce 50,000 tonnes of green steel, the ministry added.

Germany's development ministry was not immediately available to clarify when hydrogen production and exports to Germany will start or how it will be transported to Germany.

Further investments will follow on the basis of the new German-Moroccan alliance for climate and energy, it added. (Reporting by Riham Alkousaa, Editing by Friederike Heine and Kim Coghill)