(a) It is narrated from a man of the Ansar that the Prophet (peace and blessings be upon him) said: "When one of you finds a louse or the like during prayer, let him not kill it, but let him hold on to it until he has finished the prayer."
(b) Ali bin Mubarak (may Allah have mercy on him) narrates through Yahya: "Let him keep hold of it, then take it out of the mosque."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3607