A maximum principle is proved for certain problems of continuous time stochastic control with hard end constraints, (end constraints satis_ed a.s.) After establishing a general theorem, the results are applied to problems where the state equation (di_erential equation) changes at certain...