The Barbary pirates were indeed Muslim. Although many of their more effective leaders were renegade Christians.
In some cases, when these leaders retired they switched religions again and took their loot home to live in Italy or Greece.
I never heard that about their leaders. Have any examples or documentation about that?