Austrian expedition against Morocco (1829)
The Austrian Expedition against Morocco of 1829 was a successful effort of the Austrian Navy to liberate an Austrian merchant ship and its crew that had been hijacked by Morocco. Background 
Austria and Morocco first entered into diplomatic relations in 1783. On 17 April 1783, a friendship and trade treaty was signed in Vienna. As a result of the Peace of Campo Formio, Austria annexed the Republic of Venice in 1797, thereby gaining a significant increase in its merchant fleet. In order to protect itself against capturing Moroccan corsairs, Venice had paid tribute to Morocco since 1765. Austria stopped these payments. Then, in 1803, Moroccan corsairs began to hijack Austrian merchant ships. However, it was possible for the Austrian ambassador Charles-Marie Mogniat de Pouilly to renew the friendship and trade treaty with the Moroccan Sultan Moulay Slimane in November 1805. The trade and shipping treaty between Brazil and Austria, signed in 1827, led to lively trade between the two states. On the voyage from Trieste to Rio de Janeiro in the summer of 1828, the Austrian commercial brigantine Veloce was taken off Cádiz by the Moroccan brig Hijacked Rabia-el-Gheir and taken to Rabat. Under the command of Korvettenkapitän Franz Bandiera an Austrian fleet of four ships sailed, the corvettes Carolina (26 guns), Adria (20 guns), the brig Veneto and the schooner Enrichetta, to Gibraltar. Due to difficult weather conditions, the goal could not be reached until January 1829. Negotiations then began in Gibraltar between the Austrian ambassador Wilhelm von Pflügl, who had accompanied the fleet, and the Moroccan consul general Judah Benoliel. Expedition 
Although the 13-man team was released and an apology was obtained from the Moroccan government - which asserted that this action had not been authorized by them - the handover of the Veloce and the payment of compensation were refused. Bandiera then had Moroccan ports blocked. With the Carolina, the Adria and the Veneto he had the city Larache bombed on 3 June 1829, and a landing party (commanded by Paul Zimburg von Reinerz) of 136 men land in the harbour to sink the two anchored Moroccan brigs. The Moroccan ships could be set on fire unopposed using missiles, but fighting broke out on retreat. The Austrians lost 22 dead and 14 wounded, and the Moroccans about 150 men. The cities of Asilah and Tétouan were also bombed. Peace treaty 
In January 1830, the Moroccan government signalled its willingness to negotiate, as a result of which a pre-peace treaty was signed between Austria and Morocco in Gibraltar on 2 February 1830. On 19 March 1830, the peace and trade treaty of 1783 and 1805 was renewed and the Veloce was delivered to the Austrians. References 

19th century in Morocco
1829 in Morocco
1830 in Morocco
Naval battles involving Morocco
Conflicts in 1829
Conflicts in 1830