The Mahdī will be from the Prophetic lineage and will fill the earth with justice
The Prophet ﷺ said: "If only one day of this ˹worldly˺ time remained, Allah would raise up a man (the Mahdī) from my family who would fill this earth with justice as it has been filled with oppression."
عَنِ النَّبِيِّ ﷺ قَالَ لَوْ لَمْ يَبْقَ مِنَ الدَّهْرِ إِلاَّ يَوْمٌ لَبَعَثَ اللَّهُ رَجُلاً مِنْ أَهْلِ بَيْتِي يَمْلأُهَا عَدْلاً كَمَا مُلِئَتْ جَوْرًا