The people of Makkah (Mecca) rejected Islam because it rejected their false gods and asked for obedience of one Allah, while the leaders of Makkah feared that accepting Islam will mean leaving their way of life and position and accepting the Authority of Prophet Muhammad (PBUH).
They tried to assassinate Prophet (Pbuh) but failed as Prophet reached Madina (Medina). After emigration clash started between these two societies and they fought the battle of Badr in which many leaders from Makkah were killed.
[junkie-alert style=”green”] Umair bin Wahab and Safwan bin Ummaiyah decided to kill Muhammad (PBUH) as revenge against the humiliation of Badr. After agreement Umair came to Madina to kill Prophet (PBUH), when he entered Masjid Nabwi prophet asked him why have you come, he said I’m here to meet my son and didn’t revealed his real intentions. [/junkie-alert]
Then Prophet (Pbuh) revealed what he and Safwan had planned privately, knowing that there was no one who knew it Umair realized it was none other than Allah who informed His prophet about the evil plan. Umair (may Allah be pleased with him) accepted the revelation and accepted Islam and remained firm on the deen.