Sunan Abi Dawud, Book 42, Hadith 52 (Abu Dawud 4649)

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.