During the Greek War of Independence, the Austrian Navy engaged Greek pirates who routinely attempted to attack Austrian shipping in order to help fund the Greek rebellion against Ottoman rule. During the same time period, Barbary corsairs continued to prey upon Austrian shipping in the Western Mediterranean. These two threats greatly stretched the resources of Austria's naval forces, which were still rebuilding after the Napoleonic Wars. In 1829, two Austrian corvettes, a brig, and a schooner under Lieutenant Commander (German: "Korvettenkapitän") Franz Bandiera sailed Morocco's Atlantic coast to obtain the release of an Austrian merchant ship which had been captured by pirates. While the mission resulted in the return of the ship's crew, the Moroccans refused to return the ship, resulting in the Austrian bombardment of Larache. This action resulted in Morocco returning the captured Austrian ship, as well as pay damages to Vienna. The bombardment of Larache resulted in the end of North African pirates raiding Austrian shipping in the Mediterranean Sea.