The problem of regulating the fresh mass air flow M AF and the absolute pressure in the intake manifold M AP in the air path of a Diesel engine to set-point reference values is considered here. To begin with, a NARX model of the air path of a Diesel engine is obtained in terms of two (coupled) difference equations from input/output measurements of the actual system. A continuous-time state-space representation of this model is then determined and used to design a control law that solves the regulation problem, achieving at the same time a criterion of optimality. To conclude the paper, the performances of the proposed control law are tested in simulation.