1861 British loan to Morocco
The 1861 British loan to Morocco was made so that Morocco could meet the war indemnity demands of Spain after the Hispano-Moroccan War. The 1860 Treaty of Wad Ras brought the war to an end.
Source: Wikipedia — 1861 British loan to Morocco (CC BY-SA 4.0)