Given a finite alphabet Σ and a languageL ⊆ ∑+ ,the centralizer of L is defined as the maximal language commuting with it.We prove that if the primitive root of the smallest word of L (with respect to a lexicographic order) is prefix distinguishable in L then the centralizer of Lis as simple as possible, that is, the submonoidL*.This lets us obtain a simple proof of a known result concerning the centralizer of nonperiodic three-word languages.