Abu Hurayrah reports: "The Prophet informed his companions about the death of Negus (Najashi), the king of Abyssinia, the day that he died.
This rule is deduced from the Mursal Hadith stating that Muhammad performed a funeral prayer on the grave of a woman one month after her death, as Sayeed Ibn al-Musayyab reports: "Saad Bin Ubadh's mother died while the Prophet (peace and blessings of Allah be upon him) was absent.
This is similar to what Muhammad did when he heard about the death of Negus of Abyssinia, the proposed ruler (in Islamic tradition) who gave refuge to the Muslims when they fled Mecca.
Al-Khurshi (Maaliki) said (2/142): The fact that the Prophet (peace and blessings of Allah be upon him) offered the funeral prayer for the Negus (in absentia) is one of the things that applied only to him.
Al-Nawawi said in al-Majmoo’ (5/211): "Our view is that it is permissible to offer the funeral prayer for one died away from his home town, but Abu Haneefah disallowed it.