Sunan Abi Dawud, Book 17, Hadith 17 (Abu Dawud 2861)

Narrated AbuHurayrah:

The Prophet (ﷺ) said: He said: He who sticks to a king is perverted. This version adds: The nearer a servant (of Allah) goes to a king, the farther he keeps away from Allah.