Returning home in March 1801, she was ordered to prepare for a year's cruise in the Mediterranean in a squadron commanded by Commodore Richard Dale. At his own request, Decatur was relieved of the command of "Philadelphia" by Captain Samuel Barron. The squadron arrived at Gibraltar on July 1, with Commodore Dale in the frigate . "Philadelphia" was directed to cruise the Straits and blockade the coast of Tripoli, since in May 1801 the Pasha Yusuf Karamanli had threatened to wage war on the United States and had seized U.S. merchant vessels for ransom.