In this paper, a new despeckling method based on undecimated wavelet decomposition and maximum a posteriori (MAP) estimation is proposed. Such a method relies on the assumption that the probability density function (PDF) of each wavelet coefficient is generalized Gaussian (GG). The major novelty of the proposed approach is that the parameters of the GG PDF are taken to be space-varying within each wavelet frame. The variance and shape factor of the GG function are derived from the theoretical moments, which depend on the moments and joint moments of the observed noisy signal and on the statistics of speckle. Experimental results demonstrate that MAP filtering can be successfully applied to SAR images represented in the shift-invariant wavelet domain.