This study uses data from loanwords in Indonesian to argue for a phonological analysis using Harmonic Grammar (e.g. Smolensky & Legendre 2006, Pater, Bhatt & Potts 2007, Pater 2009). In original data consisting of Arabic and Dutch loanwords containing initial and final consonant clusters produced by 24 native speakers of Indonesian, we find both deletion and epenthesis to resolve word-final clusters, while word-initial clusters sometimes have epenthesis and sometimes are tolerated intact. The adaptations of Arabic and Dutch loanwords reveal the influence of three markedness constraints generally observed in Indonesian (*Complex
, and MinWord), and support a role for phonology in the analysis of borrowing, rather than a purely perceptual approach. When native monosyllables and borrowed monosyllables without clusters are considered, we find evidence that a standard Optimality Theory strict ranking is inadequate to account for the data; these constraints must be allowed to ‘gang up’, as in Harmonic Grammar, to account for the deletions, epenthesis, and non-adaptations found in the data.