A generalization of a Gregus fixed point theorem in metric spaces