In 1786, Jefferson was serving as America's minister to France, and in that capacity, he came up with the idea of forming an international coalition, together with the European Powers, to combat Barbary. He even got his old friend, the Marquis de Lafayette, to place the proposal before the various European courts. The Europeans, though, while roundly applauding the idea, just went on paying tribute. The French rejected the very notion of coalition. Jefferson concluded that, if were to attain peace, the United States had to act unilaterally.
Congress, though, thought differently, and in the summer of 1786, it instructed Jefferson to join Adams in London for one more try at negotiating with Tripoli's envoy, 'Abd al-Rahman. The pair reiterated America's desire for peace with all of the Barbary states, but 'Abd al-Rahman simply repeated his demand for $1 million and then, in a speech that will sound familiar to most Americans today, he proceeded to shock these founding fathers:
"[I]t was Â…written in the Koran, that all Nations who should not have acknowledged their [the Muslims'] authority were sinners, that it was their right and duty to make war upon whoever they could be found, and to make Slaves of all they could take as prisoners, and that every Mussulman who should be slain in battle was sure to go to Paradise." (From Jefferson's report to Congress).
On the basis of these remarks, Adams concluded that there was no use in negotiating with the North Africans, but neither could the United States resist them. "We ought not to fight them [the Barbary States] at all unless we determine to fight them forever. This though, I fear, is too rugged for our people to bear." Adams' solution, then, was to offer a small bribe to the pirates and hope that it satisfied them. But not Jefferson -- he still insisted that the American people would fight, if only given the option.
But they would not. Congress again ordered Adams and Jefferson to negotiate, this time with Morocco. The sultan, Sidi Muhammad bin 'Abdallah, claimed to have been the first monarch to recognize American independence in December 1777, but he also claimed that American had insulted him by not paying him tribute and so he joined the other Barbary States in attacking American ships.