We study the impact of a localized defect in a cellular automaton model for traffic flow which exhibits metastable states and phase separation. The defect is implemented by locally limiting the maximal possible flow through an increase of the deceleration probability. Depending on the magnitude of the defect three phases can be identified in the system. One of these phases shows the characteristics of stop-and-go traffic which cannot be found in the model without lattice defect. Thus our results provide evidence that even in a model with strong phase separation stop-and-go traffic can occur if local defects exist. From a physical point of view the model describes the competition between two mechanisms of phase separation. (C) 2002 Elsevier Science B.V. All rights reserved.