We consider finite systems of diffusing particles in R with branching and immigration. Branching of particles occurs at position dependent rate. Under ergodicity assumptions, we estimate the position-dependent branching rate based on the observation of the particle process over a time interval [0, t]. Asymptotics are taken as t fi '. We introduce a kerneltype procedure and discuss its asymptotic properties with the help of the local time for the particle configuration. We compute the minimax rate of convergence in squared-error loss over a range of Hö lder classes and show that our estimator is asymptotically optimal.