We study rearrangement invariant spaces with the Daugavet property. The main result of this paper states that under mild assumptions the only nonseparable rearrangement invariant space
over an atomless finite measure space with the Daugavet property is
endowed with its canonical norm. We also prove that a uniformly monotone rearrangement invariant space over an infinite atomless measure space with the Daugavet property is isometric to
. As an application we obtain that an Orlicz space over an atomless measure space has the Daugavet property if and only if it is isometrically isomorphic to
.