Eaton arrived at Boston on the 5th of May 1803, and in June proceeded to Washington, to adjust his accounts and to urge the adoption of more rigorous measures towards the Barbary powers. He appears to have been coldly received. His expenses incurred on Hamet's account, were not allowed by the Department of State, nor indeed were they completely admitted until they had been before Congress during its two ensuing sessions. His desire to be relieved from his situation, unless a more determined course were pursued, was considered as a resignation of his office, in which Mr. Cathcart had been appointed to succeed him; and instructions had been forwarded to that gentleman to negotiate both with Tripoli and Tunis, on the amount to be paid as presents and yearly tribute. To crown all, a letter had been written to the Bey, in which Eaton was declared "to have gone beyond the letter and spirit of his instructions," and his acts were "disclaimed as in opposition to his orders." With all these circumstances he was not indeed made acquainted immediately; but the manner of his reception did not impress him favorably with respect to the members of the Administration, and much increased his natural irritability.

The American government did not however neglect to take advantage of his information and experience; and news having arrived of some success on the part of Hamet, it was determined to send a much larger force to the Mediterranean. This squadron sailed on the 13th of August, under the command of Commodore Preble; and after halting a few days in the Straits of Gibraltar, in order to settle affairs with the Emperor of Morocco at Tangiers, it joined the other ships off Tripoli in October. A circumstance here occurred of the most disastrous nature, and which probably contributed more than any other, to prevent the dethronement of Yusuf, or the termination of the differences between the United States and the Barbary nations, in a manner entirely satisfactory to the former. The frigate Philadelphia, while in chase of a Tripoline ship on the 31st of October (1803), struck upon a rock at the entrance of the harbor of Tripoli with so much violence, that she remained immoveable by any means at the disposition of the crew, and consequently defenceless. Her situation being ascertained in the city, a number of gun boats were instantly sent out, to which, as no resistance could be made, she was of necessity surrendered. The crew, consisting of three hundred, with their captain Bainbridge, were transferred to the city; two days after the ship was got off, towed into port, and being easily repaired, was likely to prove a valuable accession to the naval strength of the Pasha.

The capture of the Philadelphia was however calculated to produce a moral effect infinitely more injurious to the American cause than the mere loss of the ship, and her acquisition by Tripoli. The skill, and even the personal bravery of the naval men of the United States, had been rendered doubtful by the proceedings of the two previous years; these doubts now assumed the form of a certainty, the most unfavorable and mortifying; and unless something had been immediately done to retrieve the honor of the flag, it must have quitted the Mediterranean in disgrace, or designated every ship over which it waved, as the bearer of tribute.

But there were noble spirits in the American squadron who determined that this should not be. On the night of the 15th of February, 1804, Lieutenant Stephen Decatur, accompanied by seventy resolute men, entered the harbor of Tripoli, in a small schooner which he had previously taken and called the Intrepid, and succeeded in boarding the Philadelphia, then lying under the guns of the castle. In a few minutes the Tripoline crew were overpowered; many were killed, others swam to the shore, and communicated the astounding facts. A terrible fire was instantly opened upon the ship from the castle and batteries, aided by those of two vessels lying near; and it being impossible to carry off the Philadelphia, she was set on fire. The Americans retreated to the Intrepid; a breeze fortunately sprung up; they were soon beyond the power of their enemies, and reached the ship which awaited them, without losing a man. The Philadelphia was totally destroyed.

This heroic achievement restored confidence to the Americans, and determined Commodore Preble to make a desperate attempt upon the city. His force had however been much reduced by the loss of the Philadelphia and the recall of other ships; and judging that an addition was necessary to afford any prospect of success, he proceeded to Naples, where he obtained from the King the use of two bomb vessels and six gun boats. These were strong, heavy, flat bottomed vessels, bad sailers, but manageable by oars, and well calculated for harbor operations. The gun boats mounted each a long twenty four pounder, and were manned by thirty-five men; the bombs carried thirteen inch mortars and forty men; several Neapolitan gunners and bombardiers were also engaged to assist in working them. The whole American force thus amounted to one frigate, (the Constitution,) three brigs, three schooners, two bombs, and six gun boats, carrying in all about one hundred and twenty guns, and one thousand and sixty men; and with this armament Preble appeared before Tripoli on the 25th of July, 1804.

Yusuf was not however taken unawares, and he had made formidable preparations for resistance. The number of his troops in the city was supposed to be twenty-five thousand; the batteries mounted one hundred and fifteen pieces of cannon; besides which, the harbor was defended by nineteen gun boats, two gallies, two schooners of eight guns each, and a brig of ten guns.

The weather was for several days unfavorable for an attack. At length on the 3d of August the American squadron approached the harbor, and began to throw shells into the town. The fire was returned from the batteries and vessels, and during five hours a constant cannonade was kept up on both sides. Three of the Tripoline gun boats were boarded and taken; their other vessels were materially injured, and much damage was done to the town and fortifications: but as nothing more could be effected, the squadron withdrew, having lost only one man, Lieutenant James Decatur, and had thirteen wounded.

The results not proving sufficient to bring Yusuf to terms, another attack was made on the 7th of August, which terminated less favorably to the Americans; one of their prizes having been blown up, and their whole loss amounting to fourteen killed, and four wounded, without having produced any notable injury to the Tripolines. On the evening of this day a frigate arrived from the United States, bringing information that a large reinforcement might be soon expected, under the command of Commodore Samuel Barron, who being the senior officer, would supercede Preble. This news caused a suspension of the attacks, during which Yusuf made offers of peace, on consideration of receiving five hundred dollars as the ransom of each of his prisoners. This offer was rejected at once, and the expected reinforcement not appearing, Tripoli was bombarded on the night of the 24th of August. On the 28th another attack was made, by which the castle and town suffered considerably, and three of the Tripoline gun boats were destroyed; and on the 3d of September another, with less success.

On the 4th a bold attempt was made to set fire to the vessels lying in the harbor, and injure the batteries. The schooner Intrepid, with which Decatur had executed his enterprise on the Philadelphia, was converted into a fire ship, being filled with powder and combustibles; and in it, with merely a boat attached in order to return after the fire had been communicated, Lieutenants Wadsworth, Somers and Israel embarked, and steered in the direction of the vessels. Two of the Tripoline gallies were seen to row towards the Intrepid, and place themselves one on each side of her; a terrific explosion then took place; the three vessels were shivered into atoms, and a number of shells fell, spreading destruction on the unfortunate town. Of those who had embarked in the Intrepid, nothing was ever heard. It is supposed that seeing escape impossible, they had involved themselves and their enemies in one common destruction.

No more attempts were made upon Tripoli during this season. The storms which prevail on that coast in the Autumn had commenced, and it was considered improper to expose the small vessels to their violence. They were therefore sent to Syracuse, the Constitution and two brigs remaining to keep up the blockade.