A global fertiliser supply shock deepened by Russia's Ukraine invasion has brought boom times for the North African phosphate superpower Morocco and earned the kingdom new diplomatic capital.
Rabat is using the leverage especially in the decades-old fight over the disputed desert territory of Western Sahara, a former Spanish colony also claimed by Algeria-backed rebels, analysts say.
Morocco is set to chalk up record revenues for a second year running as farmers worldwide scramble for phosphate, made scarce by sanctions against top world producer Russia and a Chinese ban on exports.
Phosphate is a key ingredient of artificial fertilisers, which are vital for industrial agriculture and global grain supplies despite the long-term damage they inflict on soil and groundwater.
"It's a strategic mineral for the future because it's crucial for global food security," said Abderrahim Handouf, an agricultural policy expert.
"As populations grow, fertilisers are the most effective way to increase farm productivity."
PAY ATTENTION: Subscribe to Digital Talk newsletter to receive must-know business stories and succeed BIG!
According to Morocco's state-owned phosphates firm OCP, the kingdom controls around 31 percent of the international trade in the substance.
The OCP, which holds a national monopoly in the trade, is on track to record more than 131 billion dirhams ($12.4 billion) in revenue this year, up 56 percent on 2021 -- already a bumper year.
Even before the start of the year, prices had been edging higher as the world emerged from the Covid pandemic and market leaders like China imposed export restrictions, said sector expert Mounir Halim.
There was also "strong demand from India, one of the world's biggest importers, which had exhausted its stocks," Halim told AFP.
Then as Western powers imposed sanctions on Russia after its invasion of Ukraine, prices of fertiliser shot up.
That made Morocco a vital alternative supplier. The kingdom's exports of phosphates and their derivatives jumped by two thirds year-on-year in the first nine months of 2022, according to the latest official figures.
Morocco has around 70 percent of the world's phosphate reserves, and has been mining four sites since 1921, including in the disputed Western Sahara.
Morocco's OCP has ramped up its production capacity by a factor of four since 2008, hitting 12 million tonnes last year, on target to reach 15 million by the end of 2023.
That makes it a major player in a global market fearful of further supply shocks.
The UN Food and Agriculture Organization warned in a report this year that "fertiliser supplies remain restricted, stocks are depleted and geopolitical tensions could spark additional supply restrictions at short notice."
The result is that Morocco is enjoying not only an influx of cash, but also growing diplomatic muscle, particularly on Western Sahara.
The kingdom sees the vast stretch of desert as an integral part of its territory, but the Polisario movement backed by Morocco's arch-rival Algeria seeks independence there.
Rabat has placed the question at the heart of its diplomacy.
King Mohammed VI in August demanded that Morocco's allies "clarify" their stances on the issue, calling it "the prism through which Morocco views its international environment".
According to L'Economiste, a Moroccan French-language newspaper, OCP has become "the economic arm of Moroccan diplomacy".
In September, Rabat recalled a shipment of 50,000 tonnes of fertiliser destined for Peru after Lima restored diplomatic relations with the Polisario's self-proclaimed Sahrawi Arab Democratic Republic.
Sticks and carrots
But as well as sticks, OCP offers carrots.
The firm has been expanding its presence across Africa, with branches in 16 countries, a fertiliser factory in Nigeria and a deal signed in September to open another one in Ethiopia.
It has also put aside four million tonnes of fertiliser "to support food security in Africa" next year, it said.
This year Morocco exported half a billion tonnes of fertiliser to various African countries, either for free, as aid or at preferential prices.
Morocco is even looking across the Atlantic for new markets.
In September it signed a deal with Guatemala focusing on "fertilisers and farming", according to the two countries' foreign ministers.
In the same statement, Guatemala gave its backing to Morocco's autonomy plan for the Western Sahara.
But while OCP is a potential source of international leverage on the issue, Morocco does not demand public support for its position with every contract signed.
"Morocco is using its economic arms in a pragmatic way, not in a transactional way," said international relations expert Tajeddine El Husseini.
But, he added, economic ties can have "a political impact".