 Captain John Rodgers assumed command of Constitution on 9 November 1804 while she underwent repairs and resupply in Malta. She resumed the blockade of Tripoli on 5 April 1805, capturing a Tripoline xebec and the two prizes that she had captured. Meanwhile, Commodore Barron gave William Eaton naval support to bombard Derne, while a detachment of US Marines under the command of Presley O 'Bannon was assembled to attack the city by land. They captured it on 27 April. A peace treaty with Tripoli was signed aboard Constitution on 3 June, in which she embarked the crew members of Philadelphia and returned them to Syracuse. Dispatched to Tunis, Constitution arrived there on 30 July, and by 1 August seventeen additional American warships had gathered in its harbor: Congress, Constellation, Enterprise, Essex, Franklin, Hornet, John Adams, Nautilus, Syren, and eight gunboats. Negotiations went on for several days until a short-term blockade of the harbor finally produced a peace treaty on 14 August.
