The Messenger of Allah ﷺ said on the day of Uhud, "Allah, forgive my people, for they do not know."
قال رسول الله ﷺ يوم أحد: اللهم اغفر لقومي فإنهم لا يعلمون.
Fasawi related it in al-Marifah wal-Tarikh (1/338), and Tabarani in al-Kabir (6/146), and Ibn Hibban graded it sahih (973), all of them through the route of Ibrahim bin Munzir Hizami, who said, Muhammad bin Fulayh told us, from Musa bin Uqba, from Zuhri, from Sahl bin Saad. Haythami said in al-Majma (6/117), "Tabarani related it, and its men are the men of the sahih." I say, it is as he said, except that there is some discussion about Muhammad bin Fulayh, on account of which his hadith is lowered to the rank of hasan.As for his saying, "Forgive my people," this refers to whatever harm they had inflicted upon him personally, and it does not contain a supplication for forgiveness on behalf of his people who were polytheists, because Allah has forbidden that in His saying, "It is not for the Prophet and those who believe to ask forgiveness for the polytheists, even if they were close relatives, after it has become clear to them that they are companions of the Blazing Fire" [Tawbah 9:113]. His saying, "after it has become clear", means that they died upon shirk. As for during their lifetimes, one may pray for their guidance.