File photo: A natural gas pipeline in Nigeria - P ID agreed with the Nigerian government in 2010 to build a gas plant. (AFP Photo)
Africa's gas resources are increasingly in the spotlight as the European Union looks to wean itself off Russian supplies following the invasion of Ukraine in February.
Approval for a memorandum of understanding on the gas project with West African regional bloc ECOWAS, the Economic Community of West African States, was given after a cabinet meeting, Nigeria's Petroleum Minister Timipre Sylva told reporters in Abuja late Wednesday.
Nigeria is Africa's top oil producer and a major supplier of gas and liquefied natural gas.
The minister said: "This gas line will take gas to 15 West African countries and to Morocco and through Morocco, to Spain and to Europe".
He added the project was in a design phase and details including cost and funding were still being worked out.
"It is only after the engineering design of the pipeline that we will know exactly (what) the cost of the pipeline will be. When that time comes, we will be talking about funding," he said.
Four years ago, Morocco's King Mohammed VI and Nigerian President Muhammadu Buhari agreed to move ahead with the mega-project to carry gas along the Atlantic Coast, after an initial deal was signed in 2016.
Under the deal, both countries plan to extend the pipeline that has been pumping gas from Nigeria to Benin, Togo and Ghana since 2010.
Plans for a pipeline to take Nigeria's gas resources to North Africa have long been discussed, and Algeria has also held talks with Nigeria for a similar project crossing the Sahel region.
Nigeria is a member of the OPEC group of major oil producers and has huge gas resources -- the largest proven reserves in Africa and the seventh largest globally.