The situation where a totally observed process y
tis generated by a stochastic differential equation whose parameters evolve on a finite set

according to a stochastic differential equation is considered. The optimal control law is sought with respect to quadratic loss functions on y
tand the control u
t. The auxiliary P.D.E. technique of Hijab [6] is used together with a nonlinear filter to obtain the solution whose existence depends upon that of a smooth solution to the auxiliary P.D.E. and strong solutions to the system S.D.E. under the given control inputs.