It was narrated that Abu Hurairah said:
“Then the Verse of Li’an was revealed, the Messenger of Allah (ﷺ) said: ‘Any woman who attributed her child to people to whom he does not belong, then she has no relation to (the religion of) Allah, and she will never enter Paradise, and any man who rejects his child, while he recognizes him, Allah will screen Himself from him on the Day of Resurrection and disgrace him before the witnesses.’”