Increasingly strict emission standards require very accurate and fast Air-Fuel (A/F) ratio control, Theory, implementation, and experiments for a model-based A/F ratio control system using state-space control and estimation methods are presented, An excellent match of the in-cylinder A/F ratio with the desired A/F ratio can be achieved in spite of the time delay in the system, This is accomplished by compensating the air dynamics with a drive-by-wire throttle supported feedforward control, and the fuel dynamics with an observer-based feedback control, For fast correction of steady-state system errors, the control law is extended by learning control, The proposed method is applicable to multicylinder production engines, Experimental validation is made on a single-cylinder research engine, with A/F ratio feedback from either a linear or a nonlinear exhaust gas oxygen sensor.