The most fruitful approaches to the study of slave resistance in the New World have involved examination of the slaves' struggles to create and control institutions of community and kinship in the face of planters' attempts to suppress local social reproduction altogether. Africanists who would attempt similar analysis of rebellious slave consciousness are hampered by the tradition of functionalist anthropology which dominates studies of African culture, especially Miers and Kopytoff's thesis of the integrative nature of African slavery. By contrast, more class-oriented approaches to studies of African slave resistance assume too stark a division between the consciousness of slaves and the consciousness of masters. It is suggested that Gramsci's concepts of hegemony and contradictory popular consciousness can be used to reconcile the cultural sensitivity of the first approach with the concern of the second for issues of domination and struggle. Thus a more nuanced view of slave consciousness might be reached.The case studied involves resistance to the rapid rise of sugar plantations on the northern Tanzania coast in the late nineteenth century. Miers and Kopytoff's model of the ‘reduction of marginality’ is modified to accommodate a process of conflict, as slaves struggled to gain access to institutions of Swahili prestige and citizenship and as their masters struggled to exclude them. Analysis of a large-scale slave rebellion in 1873 reveals that the consciousness of the rebels was couched in the local ‘traditional’ language of a moral economy of patrons and clients. Although this language was expressive of some of the hegemonic ideas of the emergent planter class, it was also openly rebellious. It expressed neither a slave class-consciousness nor simply the ideology of the dominant planter class but was instead a contradictory consciousness of the type that Gramsci discerned in other movements of agrarian rebellion.