The anomie theory of deviance, developed by Robert Merton, explains deviance as an adaptation either of socially prescribed goals or of the norms governing their attainment, or both. This theory posits that societal norms and values can create strain or anomie when individuals are unable to achieve culturally valued goals through legitimate means. Merton identified five modes of adaptation to this strain: conformity, innovation, ritualism, retreatism, and rebellion. Conformity involves accepting both the goals and the means to achieve them. Innovation involves accepting the goals but rejecting the legitimate means, often resorting to deviant behaviour to achieve success. Ritualism occurs when individuals abandon the pursuit of societal goals but rigidly adhere to the established norms. Retreatism involves rejecting both the goals and the means, often leading to social withdrawal. Rebellion involves rejecting the existing goals and means and attempting to replace them with new ones. Merton's theory highlights how social structures can unintentionally lead to deviance by creating a disconnect between cultural goals and the available means to achieve them.