Necessary conditions of optimality are derived for optimal control problems with pathwise state constraints, in which the dynamic constraint is modelled as a differential inclusion. The novel feature of the conditions is the unrestrictive nature of the hypotheses under which these conditions are shown to be valid. An Euler Lagrange type condition is obtained for problems where the multifunction associated with the dynamic constraint has values possibly unbounded, nonconvex sets and satisfies a mild ‘one-sided’ Lipschitz continuity hypothesis. We recover as a special case the sharpest available necessary conditions for state constraint free problems proved in a recent paper by Ioffe. For problems where the multifunction is convex valued it is shown that the necessary conditions are still valid when the one-sided Lipschitz hypothesis is replaced by a milder, local hypothesis. A recent ‘dualization’ theorem permits us to infer a strengthened form of the Hamiltonian inclusion from the Euler Lagrange condition. The necessary conditions for state constrained problems with convex valued multifunctions are derived under hypotheses on the dynamics which are significantly weaker than those invoked by Loewen and Rockafellar to achieve related necessary conditions for state constrained problems, and improve on available results in certain respects even when specialized to the state constraint free case. Proofs make use of recent ‘decoupling’ ideas of the authors, which reduce the optimization problem to one to which Pontryagin’s maximum principle is applicable, and a refined penalization technique to deal with the dynamic constraint.