A two-dimensional optimization process which simultaneously adjusts the spark timing and air-fuel ratio of a lean-burn natural gas fueled engine has been demonstrated. This has been done by first mapping the thermal efficiency against spark timing and equivalence ratio at a single speed and load combination to obtain the 3-D surface of efficiency versus the other two variables. Then the ability of the control system to find and hold the combination of timing and air-fuel ratio which gives the highest thermal efficiency was explored.The control system described in SAE Paper No. 940546 was used to map the thermal efficiency versus equivalence ratio and ignition timing. NOx, CO, and HC maps were also obtained to determine the tradeoffs between efficiency and emissions. A load corresponding to a brake mean effective pressure of 0.467 MPa was maintained by a water brake dynamometer. A speed of 2000 rpm was maintained by a fuel-controlled governor.The optimization process adds small synchronous disturbances to the spark timing and air flow while the fuel injected per cycle is held constant for four cycles. The engine speed response to these disturbances is used to determine the optimum values of spark timing and air-fuel ratio. For the condition tested, the control system found and held the equivalence ratio and spark timing corresponding to the maximum thermal efficiency. The maximum thermal efficiency was about 10% higher while NOx emissions were about 50% lower than for stoichiometric operation.This approach offers the promise of an engine control process in which the engine itself is the primary sensor. The control system is fully adaptive to changes in fuel composition, operating conditions, engine wear, or other factors which may not be easily measured. It allows the engine to continuously remap itself.