We give conditions under which a function F(t,x,u,ψ0,ψ) satisfies the relation dF/dt = ∂F/∂t + ∂F/∂x · ∂H/∂ψ − ∂F/∂ψ · ∂H/∂x along the Pontryagin extremals (x(·),u(·),ψ0,ψ(·)) of an optimal control problem, where H is the corresponding Hamiltonian. The relation generalizes the well known fact that the equality dH/dt = ∂H/∂t holds along the extremals of the problem, and that in the autonomous case H ≡ constant. As applications of the new relation, methods for obtaining conserved quantities along the Pontryagin extremals and for characterizing problems possessing given constants of the motion are obtained.