The Barbary Wars

==First barbary war (1801-1805)==
===Beginning===
The First Barbary War started when pirates from "The Barbary states" mainly from Africa and the Ottoman Empire started attacking American ships leading to Thomas Jefferson paying the Government of Tripoli where the large majority of the pirates were coming until the president Yusuf Qaramanli demanded more money which was declined leading to war. Jefferson sent some ships to Tripoli with gifts under the command of Richard Dale and while traveling the ships came across Swedish ships which joined them they soon blockaded the country and Thomas Jefferson obtained support funds from United States Congress.
==Burning of U.S.S. Philadelphia==
In 1803 Tripoli took the U.S.S. Philadelphia which resulted in American solders led by Stephen Decatur sneaked into Tripoli at night and burning the boat in 1804.
==Second Battle of Tripoli Harbors==
In July of 1804 Edward Preble who had led blockades on Tripoli led an attack on Tripoli known as The Second Battle of Tripoli Harbors, during the conflict Richard Somers and the U.S.S. Intrepid were supposedly destroyed by Tripoli forces. After the conflict Samuel Barron led a fairly successful blockade of Tripoli.
==Battle of Derna==
In 1805 William Eaton and Presley O'Bannon lead the Battle of Derna which was the first major victory for America during the war and the first time an American flag was raised over foreign soil.https://www.youtube.com/watch?v=YDDTdTJ9JTM
==The end of the First War==
In 1805 Yusuf eventually agreed to a peace agreement and gave America back any hostages and America paid them 60,000$ ending The Fist barbary War.
==The Second Barbary War (1815-1815)==
During the War of 1812 Britain asked The Barbary States to attack American ships again which they did leading to James Madison declaring War on Algiers which was were they were coming from, Madison sent a group of ships for peace agreements which they ended up doing with the prince of Algiers ending The Barbary Wars.https://en.wikipedia.org/wiki/Barbary_Wars