From our experiences in converting diesel engine into diesel-dual-fuel engine with natural gas as primary fuel, accurate air/fuel ratio control is vital to the high engine performance, good vehicle drivability, and low emissions. Two components enter in calculating the air/fuel ratio, namely, the amount of fresh air and the amount of diesel and natural gas. Throttle and EGR valve are two actuators directly affect the amount of air, and the desired total fuel determines how much fuel should be injected at an instance. As opposed to inactive, fully opened throttle in typical diesel engine, the throttle in diesel-dual-fuel engine is regulated to cover wider range of desired air/fuel ratio. As a result, the problem of controlling the amount of air in diesel-dual-fuel engine becomes that of multi variables in which both throttle and EGR valve are involved. We present a novel algorithm that breaks the multi-variable control problem into two single-variable problems. The throttle and EGR valve are regulated one at a time as determined by a switch-and-hold logic that optimizes the throttle opening to reduce pumping loss. An algorithm is also proposed to prevent the throttle from fully closed. Because the fuel path is much faster than the air path, including in the algorithm is the adjustment of the desired total fuel according to the air/fuel ratio tracking error. We found that adjusting the total fuel within a limit helps improve the transient response. Experiments were performed on an engine test bed and a pickup truck; both engines were modified from four cylindrical diesel engines to run diesel-dual-fuel, where the natural gas is injected at each intake port. The test bed experiment showed that the air/fuel ratio was accurately regulated with widest range possible. The pickup truck was commanded to follow the new European driving cycle. The results showed that the throttle opening was optimized at all time.