Grid impedance matrices estimation is important in monitoring and protection of wide-area power systems. In this study, a recursive least-squares estimation algorithm with a forgetting factor is presented to identify impedance parameters of power grids. This approach is based on synchronised phasor measurements and makes it possible to track changing parameters. The algorithm is tested on two power systems using MATPOWER-generated data, and case studies are conducted for estimation of grid impedances followed by voltage stability margin analysis and fault detection. The results show that the proposed method is effective for online estimation of grid impedances, fault detection and voltage stability monitoring.