Which distinction between precedence and caliphate is correct?

Precedence after the Prophets and the Rightly Guided Caliphate