We prove a continuous version of a relaxation theorem for the nonconvex Darboux problem xlt ε F(t, τ, x, xt, xτ). This result allows us to use Warga's open mapping theorem for deriving necessary conditions in the form of a maximum principle for optimization problems with endpoint constraints. Neither constraint qualification nor regularity assumption is supposed.