The aim of this paper is to reformulate, to generalize and to investigate the stability of the modified Prony algorithm introduced by the first author [SIAM J. Numer. Analysis 12, 571-592 (1975; Zbl 0322.65007
)], with special reference to rational and exponential fitting. The algorithm, originally for exponential functions, is generalized to the least squares fitting of any function which satisfies a linear homogeneous difference equation. Details of the implementation of the algorithm are given. A test problem is presented and simulation study compares the modified Prony algorithm with the Levenberg algorithm.