Sailing with the squadron of Commodore Richard Morris, and later, with that of Commodores Samuel Barron and John Rodgers, "Constellation" served in the blockade of Tripoli in May 1802. She cruised widely throughout the Mediterranean in 1804 to show the flag; evacuated in June 1805 a contingent of United States Marines, as well as diplomatic personages, from Derne at the conclusion of a fleet-shore operation against Tripoli; and took part in a squadron movement against Tunis that culminated in peace terms in August 1805. "Constellation" returned to the United States in November 1805, mooring at Washington, D.C., where she later was placed in ordinary until 1812.