Sunan Abi Dawud, Hadith 4630

Safinah reported the Messenger of Allah as saying: The caliphate of Prophecy will last thirty years; then Allah will give the Kingdom to whom he wishes; or his kingdom to whom he wishes.

حَدَّثَنَا عَمْرُو بْنُ عَوْنٍ، حَدَّثَنَا هُشَيْمٌ، عَنِ الْعَوَّامِ بْنِ حَوْشَبٍ، عَنْ سَعِيدِ بْنِ جُمْهَانَ، عَنْ سَفِينَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ خِلاَفَةُ النُّبُوَّةِ ثَلاَثُونَ سَنَةً ثُمَّ يُؤْتِي اللَّهُ الْمُلْكَ مَنْ يَشَاءُ - أَوْ مُلْكَهُ مَنْ يَشَاءُ - ‏" ‏ ‏.‏

sunnah.com

also referenced under: Hadith 4647 (DarusSalam)