ALGIERS - Algeria, which has cut off diplomatic ties with Morocco, will stop supplying natural gas to the country through the Maghreb-Europe pipeline from November 1, three sources with direct knowledge of the matter told Reuters.

The 13.5 billion cubic-meter (bcm) Maghreb-Europe pipeline links Algeria to Spain. Algeria will keep supplying Spain using the Medgaz undersea pipeline with an annual capacity of 8 bcm, which does not go through Morocco, the sources said.

Analysts say technical issues relating to Algeria's plans to expand the capacity of the Medgaz pipeline could escalate the energy crisis in Spain at a time of soaring gas bills across Europe.

Algeria in August hinted at the possibility of ending natural gas exports in October to Morocco of 1 billion cubic meters (bcm), used to produce around 10% of the kingdom's electricity.

One source at state-owned state oil and gas firm Sonatrach and two Algerian government sources said the supply agreement with Morocco would not be renewed.

Algerian and Moroccan energy ministries did not immediately respond to requests for comment from Reuters.

Earlier this month, a senior Moroccan official said his country is discussing with Spain the possibility of reversing the flow of a gas pipeline in case Algeria does not renew the supply deal.

Algeria is Spain's largest gas supplier, covering almost half of its gas demand through the Maghreb-Europe pipeline.

A fourth source, a senior Algerian government official, told Reuters that in the event of any disruptions, the North African country will use ships to transport liquefied natural gas (LNG) to Spain.

Analysts say that would mean Sonatrach having to charter more vessels, fuelling further LNG price rises due to shipping rates having more than doubled from earlier this month.

LNG prices have soared in recent months due to structural shortages in Europe and expectations of a cold winter and high demand.

Last month, Sonatrach said it will increase the capacity of the Medgaz gas pipeline to Spain to 10.5 billion cubic metres a year by the end of November.

Algeria's supplies to Spain will rise after the completion of a fourth gas pressure unit at Sonatrach's Medgaz facilities in the western town of Beni Saf, Sonatrach said in a statement earlier this year.

Sonatrach said the process could be completed by the end of November.

Spain's gas system operator, Enagas, has sold extra space for liquefied natural gas (LNG) deliveries this winter in a bid to stabilise supply as voracious global demand forces up energy prices.