We propose a new iterative algorithm for the generation of a codebook in vector quantization. The algorithm starts with an initial codebook that is improved by a combination of merge and split operations. By merging small neighboring clusters, additional resources (codevectors) are released. These extra codevectors can be reallocated by splitting large clusters. This process can be iterated until no further improvement is achieved in the distortion of the codebook. Experimental results show that the proposed method performs well in comparison to other tested methods, including the generalized Lloyd algorithm (GLA) and two hierarchical methods.