Homotopy Gerstenhaber structure is shown to exist on the deformation complex of a morphism of associative algebras. The main step of the construction is extension of a B-infinity algebra by an associative algebra. Actions of B-infinity algebras on associative and B-infinity algebras are analyzed, extensions of B-infinity algebras by associative...