The situation where a totally observed process ytis 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 ytand the control ut. The auxiliary P.D.E. technique of Hijab  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.