It is narrated from Sayyiduna Ali (may Allah be pleased with him) that he said: "The last words of the Messenger of Allah (peace and blessings be upon him) were: 'The prayer, the prayer (hold fast to the prayer)! And fear Allah regarding those whom you own.'"
Imam Ahmad (may Allah have mercy on him) narrated it from Muhammad bin Fudayl (may Allah have mercy on him).
Imam Abu Dawud (may Allah have mercy on him) narrated it from Zuhayr (who is Ibn Harb) (may Allah have mercy on him).
Imam Ibn Majah (may Allah have mercy on him) also narrated it through Sahl bin Abi Sahl (may Allah have mercy on him), from Ibn Fudayl (may Allah have mercy on him), but he did not mention the words "And fear Allah regarding those whom your right hands possess."