When the Prophet, peace be upon him, decided to emigrate to Madinah, the polytheists of Makkah worked a plan to kill him, but the Prophet, peace be upon him, could leave Makkah undetected. What is important is this story is that before he left Makkah the Prophet, peace be upon him, also asked his cousin Ali to give back to the Makkah people their valuables, which he was entrusted for safekeeping. In other words, when those very people were planning to kill him, he was thinking of how he could give everyone of them the valuable article, which he kept safe for them.