A challenge problem associated with fringe pattern profilometry (FPP) systems is the unwrapping of phase maps resulted from complex object surface shapes. The simple path-following approaches are efficient in terms of computational burden and speed, but they suffer from the errors caused by large steps on the object surface and phase detection noise. Quality-guided flood-fill algorithms are robust and suitable for complex phase maps, but they are very expensive computationally and thus not suitable for fast measurement. In this paper we propose a new quality-guided spatial phase unwrapping algorithm. In the proposed method, the phase map is divided into two types of areas: high quality (HQ) areas corresponding to smooth phase variance and low quality (LQ) ones to rough phase changes. These two types of areas are unwrapped by means of two different approaches. That is, HQ areas are unwrapped by a simple algorithm and LQ ones are recovered by quality-guided flood-fill algorithm. Experiments show that the proposed approach is much faster than the quality-guided flood-fill algorithm in unwrapping complex phase maps, but the accuracy performance is very close to that of the latter.