Yes, you're right—it was the major justification they themselves provided for the raids, enslavement, and tribute demands.
The clearest evidence comes directly from the March 28, 1786, meeting in London between Thomas Jefferson, John Adams, and the Tripolitan ambassador (Sidi Haji Abdul Rahman Adja). When the Americans asked why the Barbary states attacked U.S. ships and crews despite no prior injury or provocation, the ambassador replied (as recorded in their official letter to Congress):
“It was founded on the Laws of their Prophet, that it was written in their Koran, that all nations who should not have acknowledged their authority were sinners, that it was their right and duty to make war upon them wherever they could be found, and to make slaves of all they could take as prisoners, and that every Musselman [Muslim] who should be slain in battle was sure to go to Paradise.”
He added that Islam offered incentives like extra slaves for those who boarded infidel ships first, and that the sight of the jihadis (armed with knives) terrified enemies.
This was not a fringe view—it aligned with how the Barbary rulers and corsairs framed their operations as naval jihad (jihad fil-bahr) against the dar al-harb (the non-Muslim world). Raids on Christian shipping and coasts, galley slavery, coastal village attacks, and ransom demands were presented as religiously sanctioned duties, drawing on classical Islamic teachings regarding warfare against non-Muslims, treatment of captives, and the collection of tribute or jizya-like payments from those who refused to submit.
Early American leaders took this explanation seriously. Jefferson, in particular, bought a copy of the Quran (in English translation) to understand the doctrine better and later cited the ongoing threat as a key reason to build a navy rather than keep paying tribute. The U.S. response—starting with the First Barbary War in 1801—was pragmatic self-defense of commerce and sovereignty, not a religious crusade on America's side (as the 1797 Treaty with Tripoli explicitly noted no enmity toward the "religion... of Musselmen").
Contemporary U.S. newspaper reports on events like the 1801 USS Enterprise victory often referred to the enemy as "Mohammedan" or "Mussulman" cruisers/pirates, reflecting awareness of this religious motivation alongside the practical horrors of capture and enslavement.
This exchange is one of the earliest documented U.S. encounters with that ideology, and it shaped Jefferson's determination to end the tribute payments through force. Primary records of the letter are preserved in U.S. State Department and congressional archives, and the full context appears in the Naval Documents Related to the United States Wars with the Barbary Powers.