ABUJA, Nov 21 (Reuters) - Nigerian and German companies on Tuesday signed two accords in Berlin that include a $500 million renewable energy pact and a gas export deal, further strengthening economic ties between the two nations, a presidential spokesperson said.

Union Bank of Nigeria and Germany's DWS Group signed a memorandum of understanding (MoU) on renewable energy. The agreement seeks to harness $500 million in investment in renewable energy projects across Nigeria, mostly in rural communities, spokesperson Ajuri Ngelale said in a statement.

A second MoU on gas export partnership was agreed between Riverside LNG of Nigeria and Germany's Johannes Schuetze Energy Import AG. Under the accord, Nigeria will supply 850,000 tons of natural gas to Germany annually which is expected to rise to 1.2 million. The first deliveries will be in 2026, Ngelale said.

The deal will help process about 50 million cubic feet per day of natural gas that otherwise would have flared.

Nigeria holds Africa's largest gas reserves of more than 200 trillion cubic feet, but flares, or burns off, about 300 million cubic feet daily due to inadequate processing facilities.

President Bola Tinubu, who is attending the G20 Compact with Africa conference in Berlin, welcomed the deals, Ngelale said.

On Monday German Chancellor Olaf Scholz said Germany will invest 4 billion euros in green energy projects in Africa until 2030, noting these could in turn help Europe's largest economy achieve its own transition to carbon neutrality.

Germany will need to import large quantities of green hydrogen going forward, including from Africa, if it is to achieve its goal of net zero emissions by 2045, he said at a German-African business forum in Berlin.

The forum preceded the G20 Compact with Africa summit that aims to drum up investment in the world's poorest but fast-growing continent by coordinating the development agendas of reform-minded countries and identifying business opportunities.

Under Tinubu, Nigeria has embarked on the boldest reforms in decades, scrapping a popular petrol subsidy and lifting restrictions on foreign exchange trading.

Tinubu is seeking to make Nigeria attractive to investors as he strives to revive its economy that is weighed down by sluggish growth, record debt, double-digit inflation and theft of crude oil, its main export.

(Writing by Elisha Bala-Gbogbo; editing by David Evans)