We propose in this paper an optimal closed loop control law for multiconjugate adaptive optics (MCAO), based on a Kalman filter and a feedback control. The so-called open loop optimal phase reconstruction is recalled. It is based on a Maximum A Posteriori (MAP) approach. This approach takes into account wavefront sensing noise and also makes use of a turbulence profile model and Kolmogorov statistics. We propose a closed-loop modelization via a state-space representation. A Kalman filter is used for the phase reconstruction. This approach is a closed loop generalization of the MAP open loop estimator. It uses the same spatial prior in addition with a temporal model of the turbulence. Results are compared with the Optimized Modal Gain Integrator approach in the classical adaptive optics case and in an MCAO-like case.© (2003) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.