Final answer:
Lieutenant Stephen Decatur was trying to prevent the Barbary pirates from gaining control over the Mediterranean Sea.
Step-by-step explanation:
The Barbary pirates were pirates and privateers who operated in the coastal areas of North Africa, primarily in the ports of the Barbary States—modern-day Morocco, Algeria, Tunisia, and Libya—during the late 16th to the early 19th centuries. The term "Barbary" is derived from the name of the region.
Lieutenant Stephen Decatur was trying to prevent the Barbary pirates from gaining control over the Mediterranean Sea by leading a daring expedition into Tripoli harbor to destroy the captured American vessel on February 16, 1804.