The Barbary Pirates originated from North Africa and engaged in piracy against merchant ships in the Mediterranean, demanding tribute payments from foreign powers. During Thomas Jefferson's presidency, debates emerged over whether the United States should pay tribute to or fight the Barbary Pirates. After American ships were attacked and crews taken hostage, the United States fought back, eventually winning naval victories and ending the threat of the Barbary Pirates through military force.