This paper proposes an observer-based state feedback control for controlling both the air-fuel-ratio (AFR) and the oxygen level of the three-way catalytic converter (TWC) in port-fuel-injection automotive gasoline engines. The operation of TWCs depends on the combustion mixture's air-fuel ratio as well as the oxygen storage level of the TWC. Accurate control of the air-fuel ratio is therefore required. TWCs can store oxygen from the exhaust gas when the exhaust gas is lean and can use up the stored oxygen when the exhaust gas is rich. Measurements of the air to fuel ratio are taken using oxygen sensors (UEGO) before and after the catalytic stage. The goal of this work is to develop control schemes that use the measurement of both UEGO sensors and thereby aim at improving the AFR control performance. Simulation results demonstrate that the proposed observer-based state feedback control can, in comparison with a PID controller, improve the efficiency of the operation of the TWC by maintaining the oxygen level at 50 % while regulating AFR to the optimized stoichiometric ratio.