The Obligatory Contour Principle (frequently abbreviated OCP) is a hypothesis in autosegmental phonology that states that (certain) consecutive identical features are banned in underlying representations. The OCP is most frequently cited when discussing the tones of tonal languages (stating for example that the same morpheme may not have two underlying high tones), but it has also been applied to other aspects of phonology.
A commonly held conception within phonology is that no morpheme is allowed to contain two consecutive high tones. If two consecutive high tones appear within a single morpheme, then some rule must have applied (Odden 1986). Maybe one of the surface high-tone vowels was underlyingly high-toned, while the other was underlyingly toneless. Then, since all vowels must have tone at the surface (in this hypothetical language), the high tone of the one vowel spreads onto the other (see: autosegmental phonology). Alternatively, one (or both) of the vowels may have started out low-toned and become high-toned due to the application of some rule; or perhaps there was a low tone between the two high tones that got deleted at some point. Regardless, the OCP claims that there can not have been two consecutive high tones (nor two consecutive low tones, etc.) in the underlying representation of the morpheme, i.e. in the morpheme's lexical entry.
The locus classicus of the OCP is Leben (1973), in which it was formulated as a morpheme-structure constraint precluding sequences of identical tones from underlying representations. In autosegmental phonology (Goldsmith 1976), with articulated conceptions about associations between featural melodies and skeletal units (i.e. CV phonology, see McCarthy 1979, McCarthy 1981, Steriade 1982, Clements & Keyser 1983), moraic phonology (Hyman 1985, Hayes 1989), the OCP was considered to be relevant to adjacent singly linked melodies but not to doubly linked melodies. The OCP in this 'rules and constraints' era was no longer simply a constraint on underlying forms, but also began to play a role in the course of a phonological derivation. McCarthy (1986) proposed that the OCP can actively block the application of or repair the output of phonological rules, while in Yip (1988), Moira Yip attempted to extend the role of the OCP to trigger the application of rules as well. However, there was also a strong opposition to the OCP as a formal constraint in phonological theory, headed by David Odden. Odden (1986) showed that, contrary to the contemporaneous assumption that constraints were inviolable, an examination of African tonal systems reveals many apparent surface violations of the OCP. A lively debate continued between John McCarthy and David Odden for several years, with each adding an extra 'anti-' to the title of the previous article of the other - e.g. "Anti anti-gemination and the OCP" (Odden 1988), a reply to (McCarthy 1986).