It is narrated from Anas bin Malik (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) never took off his sandals during the prayer except once, and the people also took off their sandals. He (peace and blessings be upon him) asked: "Why did you take them off?" They said: You (peace and blessings be upon him) took off your sandals, so we took ours off too. He (peace and blessings be upon him) said: "Jibril (peace be upon him) informed me that there was filth on them."
Only Abdullah bin al-Muthanna narrated it, and Allah knows best.
As for Ibn Umar (may Allah be pleased with them both), he would build upon the prayer already performed in this case (blood on the garment) and in the case of a nosebleed; while al-Miswar bin Makhramah used to say that he should start the prayer afresh, and that is the analogy with ablution (wudu) in this issue.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4091