The North African Barbary States are usually dismissed as an unimportant, though bothersome, pirate base of little consequence in the late eighteenth and early nineteenth centuries. This thesis challenges that idea by providing qualitative and quantitative evidence of Barbary's role in trade and diplomacy during the French Revolutionary and Napoleonic Wars, especially as it affected Britain and how the British were able to carry out their military and political goals in the Mediterranean. The study is based on the correspondence between the British government and its military leaders in the region, the correspondence and reports generated by British consuls working in Barbary, import/export records, and a database tracking British shipping to and from North Africa during the conflict. To the British, Barbary was not an irritation but an asset. Britain was able to manage Barbary's trade and foreign policy over the course of the twenty-three-year conflict. This was accomplished in two key ways: as a source of supplies for British forces and through the diplomatic role provided by Britain's extensive consul network. Though the North African states were neutral for the majority of both wars, Britain worked strenuously to maintain and increase its trade and diplomacy with Barbary for the benefit of the British armed forces. British trade with Barbary, supported by the British-Barbary diplomatic relationship, directly contributed to British successes in the Mediterranean and Iberian Peninsula.