Abstract. Let G be a locally compact group and K be a compact group of automorphisms of G . We consider the functional equation where is a continuous function, is a weakly continuous function and (,) is a Hilbert space. This equation is a generalization of Gajda's functional equation of d'Alembert type. If is a solution of this equation, then the functions f and a are K -invariant and f is K -positive definite, i.e. the kernel is positive definite. This kernel is the reproducing kernel of a Hilbert space of functions on G , and this implies several properties for f . If is of finite dimensional, we show that the general solution of this equation is of the form where is an operator valued K -spherical function, with ( is the adjoint operator of ) and . As an application Chojnacki's and Stetkær's results on operator-valued spherical functions are used to give explicit solution formulas of this equation, in terms of strongly continuous unitary representations of G .