Hashim bin Yahya al-Farra' al-Mujashi'i (may Allah have mercy on him) said: Once Malik bin Dinar (may Allah have mercy on him) was sitting when suddenly a man came to him and said: O Abu Yahya! Pray for my wife; she has been pregnant for four years and today she is in severe distress. Malik bin Dinar (may Allah have mercy on him) became angry and closed the Mushaf (that is, the Qur'an), then said: These people think that we are prophets. Then he supplicated: "O Allah, if there is wind in this woman's belly, expel it at this very hour; and if there is a girl in her belly, exchange her for a boy, for indeed You erase what You will and confirm what You will, and with You is the Mother of the Book [Surah al-Ra'd: 39]." Then Malik (may Allah have mercy on him) raised his hands and the people raised their hands too, and a messenger came to the man and said: Reach your wife, that is, go to your wife. The man went. Malik (may Allah have mercy on him) had not yet lowered his hands when the man appeared at the door of the mosque carrying on his shoulders a four-year-old boy with short curly hair, whose teeth had already come in evenly and whose umbilical cord had not yet been cut.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العدد / 15557