A conflict between the USA and the Karamanli dynasty of Tripoli, which in 1796 had obtained from the USA the annual payment of $83,000 for the protection of its commerce from piracy. In 1801 the Bey of Tripoli demanded an increase; the USA declined and sent a naval force to blockade the port of Tripoli. In 1803 the Tripolitanians captured the US ship Philadelphia. US forces then captured the port of Derna and the Bey agreed to peace, which was concluded in 1805. The Bey received $60,000 as ransom for the Philadelphia and renounced all rights to levy tributes on US ships. In 1815, following breaches of the agreement, a US squadron under Captain Stephen Decatur again visited North Africa and compelled the Bey of Algiers to renounce payments for immunity.