Present trends towards the globalisation and hybridisation of popular music genres are illustrated through an examination of two types of music currently popular in North Africa: rai, a genre originating in Algeria and now becoming better known in the West, and rap, a product of the West which has now been appropriated by Algerian and Moroccan performers. Parallels are drawn between the paths followed by these two genres. The study focuses on the use made of code switching between Arabic and French in both genres. Different patterns of switching are identified and their funtions explored. It is argued that in both genres switching may be used both as a localising device, through the use of a highly specific in-group variety, and as a device which opens up the lyrics to a wider range of audiences.