Abdullah b. Abbas narrates from the Holy Prophet (s.a.w.a.) who proclaimed, ‘After me, my successors and vicegerents on the earth shall be twelve in number. The first among them is my brother, while the last is my son.’ He (s.a.w.a.) was asked, ‘Who is your brother?’ He (s.a.w.a.) replied, ‘Ali b. Abi Talib.’ Then he (s.a.w.a.) was asked, ‘Who is your son?’ The Holy Prophet (s.a.w.a.) replied, ‘Mahdi, who shall fill the earth with justice and equity as it would have been ridden with injustice and tyranny.
Faraaed al-Simtain vol 2 pg 334 trad 562