They kidnapped people from as far away as Ireland and brought them to Africa as slaves, in addition to taking them off of ships.
Mb>Barbary slave trade
https://en.wikipedia.org/wiki/Barbary_slave_trade
Davis estimates that 1 million to 1.25 million white Christian Europeans were enslaved in North Africa, from the beginning of the 16th century to the middle of the 18th, by slave traders from Tunis, Algiers, and Tripoli alone (these numbers do not include the European people which were enslaved by Morocco and by other ...
Lots of things have gone on in history, some of them good, most of them not so good. Some of the pirates that operated around the east coast and Bahamas in the early 1700's were from N.Africa and were nominal Muslims (just as other pirates were nominal Christians). Because there were pirates operating in an around America doesn't mean we should brag that "there were pirates in America from the beginning" as if that has any relevance to anything.
At the time of the founding of this country there were more White Christian European and Americans enslaved in N Africa and the ME by muslims than there were black africans enslaved in the US.