Scottish Gaelic displays a phonological contrast that is realised in different dialects by means of tonal accent, glottalisation or overlength. In line with existing analyses of similar oppositions in languages such as Swedish, Danish, Franconian and Estonian, I show that this contrast reflects a difference in metrical structure. Using the framework of Stratal Optimality Theory, I argue that this metrical contrast is derived, and results from faithfulness to foot structure that is built regularly at the stem level, but rendered opaque by subsequent phonological processes. Scottish Gaelic therefore represents an intermediate stage in the diachronic development of underlyingly contrastive metrical structure. This analysis successfully accounts for the complex properties of svarabhakti, a process of copy epenthesis that is intimately connected to the phonological contrast in question, and also sheds light upon the relationship between the oppositions of tonal accent, glottalisation and overlength found in various languages of northern Europe.