Slovenian velar palatalization has been described as a morphologically and lexically restricted, variable derived environment effect. This paper presents a corpus-based study that for the first time also considers synchronic phonological factors. Much of the variation turns out to be conditioned by local and long-distance consonant co-occurrence restrictions. In terms of local interactions, palatalization invariantly applies to remove an illicit consonant cluster while being blocked when it would result in an illicit consonant cluster. The more surprising finding is that other consonants within the stem also strongly affect palatalization. Palatalization of the stem-final velar is less likely if the stem contains another velar, and palatalization is categorically blocked if the stem contains a postalveolar obstruent, at any distance from the suffix. These data constitute a previously unreported type of local derived environment effects that are blocked at a distance. This interpretation of the Slovenian data sheds a new perspective on typologically similar patterns. The local and long-distance interactions found in Slovenian are modeled within the Maximum Entropy weighted constraint framework.