<P> Before committing himself to the Mediterranean, Decatur learned from the American consuls at Cadiz and Tangier of any squadrons passing by along the Atlantic coast or through the Strait of Gibraltar . To avoid making known the presence of an American squadron, Decatur did not enter the ports but instead dispatched a messenger in a small boat to communicate with the consuls . He learned from observers there that a squadron under the command of the notorious Rais Hamidou had passed by into the Mediterranean, most likely off Cape Gata . Decatur's squadron arrived at Gibraltar on June 15, 1815 . This attracted much attention and prompted the departure of several dispatch vessels to warn Hammida of the squadron's arrival . Decatur's visit was brief with the consul and lasted only for as long as it took to communicate with a short letter to the Secretary of the Navy informing him of earlier weather problems and that he was about to "proceed in search of the enemy forthwith", where he at once set off in search of Hamidou hoping to take him by surprise . </P> <P> On June 17, while sailing in Guerriere for Algiers, Decatur's fleet encountered near Cape Palos the frigate Mashouda, commanded by Hamidou and the Algerian brig Estedio, which were also en route to Algeria . After overtaking the Mashouda, Decatur fired two broadsides, crippling the ship, killing 30 of the crew, including Hamidou himself, and taking more than 400 prisoners . Lloyd's List reported that the Algerine frigate Mezoura, which had been under the command of the Algerine admiral, had arrived at Carthagena on June 20 as a prize to Decatur's squadron . The newspaper also reported that Decatur's squadron had run another Spanish frigate onshore near Carthagena . </P> <P> Capturing the flagship of the Algerian fleet at the Battle off Cape Gata Decatur was able to secure sufficient levying power to bargain with the Dey of Algiers . Upon arrival, Decatur exhibited an early use of gunboat diplomacy on behalf of American interests as a reminder that this was the only alternative if the Dey decided to decline signing a treaty . Consequently, a new treaty was agreed upon within 48 hours of Decatur's arrival, confirming the success of his objectives . </P> <P> After bringing the government in Algiers to terms, Decatur's squadron set sail to Tunis and Tripoli to demand reimbursement for proceeds withheld by those governments during the War of 1812 . With a similar show of force exhibited at Algiers Decatur received all of his demands and promptly sailed home victorious . Upon his arrival Decatur boasted to the Secretary of the Navy that the settlement had "been dictated at the mouths of our cannon ." For this campaign, he became known as "the Conqueror of the Barbary Pirates". </P>

Who was an american naval hero in the war of 1812