“The Messenger of Allah (ﷺ) said: ‘There are three whose prayer are not accepted: A man who leads people while they do not like him; a man who does not come to prayer until its end – meaning after its time has expired – and one who enslaves a freed person.’”
Sunan Ibn Majah Book 5, Hadith 168