Commodore Preble, in the meantime, hurried his preparations for more serious work, and on July 25th arrived off Tripoli with a squadron, consisting of the frigate _Constitution_, three brigs, three schooners, six gun-boats, and two bomb vessels. Opposed to him were arrayed over a hundred guns mounted on shore batteries, nineteen gun-boats, one ten-gun brig, two schooners mounting eight guns each, and twelve galleys. Between August 3rd and September 3rd five attacks were made, and though the town was never reduced, substantial damage was inflicted, and the subsequent satisfactory peace rendered possible. Preble was relieved by Barron in September, not because of any loss of confidence in his ability, but from exigencies of the service, which forbade the Government sending out an officer junior to him in the relief squadron which reinforced his own. Upon his return to the United States he was presented with a gold medal, and the thanks of Congress were tendered him, his officers, and men, for gallant and faithful services.
The blockade was maintained vigorously, and in 1805 an attack was made upon the Tripolitan town of Derna, by a combined land and naval force; the former being under command of Consul-General Eaton, who had been a captain in the American army, and of Lieutenant O'Bannon of the Marines. The enemy made a spirited though disorganized defence, but the shells of the war-ships drove them from point to point, and finally their principal work was carried by the force under O'Bannon and Midshipman Mann. Eaton was eager to press forward, but he was denied reinforcements and military stores, and much of his advantage was lost. All further operations were, however, discontinued in June, 1805, when, after the usual intrigues, delays, and prevarications, a treaty was signed by the Pasha, which provided that no further tribute should be exacted, and that American vessels should be for ever free of his rovers. Satisfactory as was this conclusion, the uncomfortable fact remains that tribute entered into the settlement. After all the prisoners had been exchanged man for man, the Tripolitan Government demanded, and the United States paid, the handsome sum of sixty thousand dollars to close the contract.