Circle finding and fitting is a frequent problem in the data analysis of high-energy physics experiments. In a tracker immersed in a homogeneneous magnetic field, tracks with sufficiently high momentum are close to perfect circles if projected to the bending plane. In a ring-imaging Cherenkov detector, a circle of photons around the crossing point of a charged particles has to be found and its radius has to be estimated. In both cases, non-negligible background may be present that tends to complicate the circle finding and to bias the circle fit. In this contribution we present a robust circle finder/fitter based on a modified Riemann fit that significantly reduces the effect of background hits. As in the standard Riemann fit, the measured points are projected to the Riemann sphere or paraboloid, and a plane is fitted to the projected points. The fit is made robust by replacing the usual least squares estimate of the plane by a least median of squares (LMS) estimate. Because of the high breakdown point of the LMS estimator, the fit is insensitive to background points which can then be eliminated from the sample. This constitutes the finding stage. The plane is then refitted with the remaining points by an M-estimator in order to suppress eventual remaining outliers and to obtain the final circle fit. The method is demonstrated on artificial data with points on a circle plus up to 100% background points, with points on two overlapping circles with additional background, and with points obtained by the simulation of a generic inner tracking system with mirror hits and additional background. The results show high circle finding efficiency and small contamination of the final fitted circles.