NAIROBI (Reuters) - Somalia received a pledge of aid for $50 million from Saudi Arabia this month on the same day it announced it was cutting ties with Saudi rival Iran, a document seen by Reuters showed.

Shi'ite Muslim girls hold signs of cleric Nimr al-Nimr, who was executed along with others in Saudi Arabia, as they take part in a protest rally in Islamabad, Pakistan, January 8, 2016. REUTERS/Faisal Mahmood

The government, which did not confirm or deny the pledge, has said there was no link between long-running Saudi financial support and its diplomatic decision to break ties with Iran. The Saudi Foreign Ministry did not respond to requests for comment.

But diplomats said it was the latest sign of patronage used by the kingdom to shore up regional support against Iran, a rivalry that deepened this month when Sunni majority Saudi Arabia executed a Shi’ite cleric and Iranian protesters responded by torching the Saudi embassy in Tehran.

“The Saudis currently manage to rally countries behind them both on financial grounds and the argument of non-interference,” a diplomat said, referring to what Sunni-majority countries see as Iran’s habit of cultivating ties to their Shi’ite minorities.

A document from the Saudi embassy in Nairobi to the Somali embassy in the Kenyan capital showed the kingdom pledging $20 million in budget support and another $30 million for investment in Somalia, a nation trying to rebuild after two decades of war.

The two grants would come from the Saudi Development Fund, according to the document that was dated Jan. 7, the same day Somalia cut ties with Tehran.

Somalia cut relations with Iran saying Tehran had meddled in Somali affairs and threatened national security. Mogadishu gave Iranian diplomats, among the few stationed in the Somali capital where bomb attacks are frequent, 72 hours to leave.

Somalia’s Finance Minister Mohamed Aden Ibrahim declined to comment on the pledges, but said any financial assistance from Saudi Arabia was not related to Mogadishu’s stance against Iran.

“Our relationship with Saudi Arabia was long-standing and is not something that has just started,” the minister told Reuters.

Several other Arab states such as neighbouring Bahrain, a long-time close ally and recipient of Saudi largesse also cut ties. Other wealthier Gulf states withdrew envoys.

Sudan, which like Somalia and Saudi Arabia is a member of the Arab League, said it had cut ties with non-Arab Iran.

Somalia’s ties with Saudi Arabia have grown as it tries to rebuild a nation while battling an Islamist insurgency, although Western powers and Turkey remain among the biggest and more prominent donors to the country.

Somalia’s president, Hassan Sheikh Mohamud, met King Salman bin Abdul Aziz al-Saud in Saudi Arabia in October. A Saudi team had visited Somalia in late 2015 to discuss further Saudi support for the country.

“Any financial and other requests that we made to the Saudis were way before” Somali cut ties with Iran, Foreign Minister Abdusalam Omer told Reuters.