Sa'id bin al-Musayyib (may Allah have mercy on him) narrates from Basrah bin Abi Basrah al-Ghifari (may Allah be pleased with him) that he married a virgin woman. When he went in to her, he found her pregnant. He mentioned that to the Prophet (peace and blessings be upon him), so he (peace and blessings be upon him) separated them and said: "When she gives birth, flog her," and he assigned her dower to her for what he had made lawful of her private part.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13891