We will prove a kind of stability result for homomorphisms from locally compact to completely regular topological universal algebras with respect to the compact-open topology on the space of all continuous functions between them. More precisely, given such algebras A and B and two additional set-valued mappings controlling the continuity of (partial) functions g from A to B and the range of the sets g(a) for individual elements a ∈ A, every "controlled" partial function behaving almost like a homomorphism on a sufficiently big compact subset of A is arbitrarily close to a continuous homomorphism A → B on a compact set given in advance. We will give some counterexamples, showing the necessity of the assumptions, and discuss some special cases, among them a purely algebraic problem of extendability of finite partial functions to homomorphisms.