I think the M4 is the pinnacle of the mechanical M cameras - it does everything right and the build quality is fantastic.
The Nikon rangefinders are much like the early F cameras - well made, but not as refined as the Leica. The viewfinder/rangefinder in the Leica is better, as is the precision of the mechanisms.
But, overall, actually using the S cameras is great. They seem indestructible, and the rangefinder mechanism is very robust (and easy to re-calibrate in the rare instance that they need that). I have a S2 and a S4 - the S4 is more modern in feel, and the viewfinder is brighter, but also more flarey. The S2 has a better focusing patch, and feels decidedly old(er) school in use.
I've not used a SP, but my understanding is that they have the dimmest patch of all the S series.
The Nikon rangefinders give you 90% of a Leica at about 50% of the price.