The infrared emission limb sounder MIPAS (Michelson Interferometer for Passive Atmospheric Sounding) will be operated as an ESA core instrument on the ENVISAT-1 satellite. Near real time retrieval of pressure, temperature (p,T) and volume mixing ratio (VMR) of five key species (O-3, H2O, N2O, CH4, and HNO3) from calibrated spectra will be performed in the Level 2 processor of the ENVISAT Payload Data Segment. In order to develop an optimized (with respect to speed and accuracy) retrieval algorithm suitable for the implementation in MIPAS Level 2 processor, an ESA supported study is being carried out. In the framework of this study, an optimized forward / retrieval code based on the global fit approach was implemented. In this approach all the spectra of a limb-scanning sequence are simultaneously fitted, so that error propagation in the altitude domain is avoided.The attained accuracy performances of the retrieval code are the following:Temperature error < 2 K at all the altitudes covered by the standard MIPAS scan (8-53 km)Tangent pressure error: < 3%Error on the retrieved VMR of the key species: < 5 % at most of the altitudes of scientific interest covered by the standard MIPAS scan.The run-time required to perform p,T and VMR retrieval of the five MIPAS target species from a limb-scanning sequence of 16 limb-views is less than 6 minutes on a SUN SPARCstation 20. The most effective code optimizations were implemented in the radiative transfer model and in the computation of the jacobian of the retrieval.