Abstract. We consider an optimal control problem for systems governed by nonlinear ordinary differential equations, with control and state constraints, including pointwise state constraints. The problem is formulated in the classical and in the relaxed form. Various necessary/sufficient conditions for optimality are first given for both problems. For the numerical solution of these problems, we then propose a penalized gradient projection method generating classical controls, and a penalized conditional descent method generating relaxed controls. Using also relaxation theory, we study the behavior in the limit of sequences constructed by these methods. Finally, numerical examples are given.