He had intercourse with his ex-wife during the ‘iddah without intending to take her back and she became pregnant
Question

                A husband had intercourse with his ex-wife two months after the court sentenced their divorce. She just went to him and they had intercourse, possibly she became pregnant then. Is this considered as if he took her back? Is this pregnancy legal islamically? .
Praise be to Allah.
    The ‘iddah of a woman who has been revocably divorced lasts 
    for three menstrual cycles if she menstruates, and three months if she is 
    past the age of menopause or she is a minor who does not menstruate, because 
    Allaah says (interpretation of the meaning): 

    “And divorced women shall wait (as regards their marriage) 
    for three menstrual periods”

    [al-Baqarah 2:228] 

    “And those of your women as have passed the age of monthly 
    courses, for them the ‘Iddah (prescribed period), if you have doubt (about 
    their periods), is three months; and for those who have no courses [(i.e. 
    they are still immature) their ‘Iddah (prescribed period) is three months 
    likewise, except in case of death]”

    [al-Talaaq 65:4]

    The husband may take his wife back during the ‘iddah, whether 
    she agrees to that or not. 

    Taking the wife back is done by means of words indicating 
    that, according to scholarly consensus, such as his saying “I take you 
    back.” 

    But the fuqaha’ differed as to whether taking back is done by 
    means of actions, such as intercourse and that which leads to it of touching 
    and kissing. There are four opinions: 

    1 – 

    The Hanafis are of the view that taking back is done by means 
    of intercourse and kissing with desire on any part of the body, and by 
    touching even if it is through a barrier through which the heat of desire 
    may be felt. They regarded all of that as an indication of taking back the 
    wife, as if by having intercourse he has agreed for her to become his wife 
    once again. 

    2 – 

    The Maalikis are of the view that taking back the wife by 
    actions such as intercourse and the things that lead to it is valid, so long 
    as the husband intends by means of these actions to take her back. If he 
    kisses her or touches her with desire, or he looks at the site of 
    intercourse with desire, or he has intercourse with her without intending to 
    take her back, then the taking back by means of doing these things is not 
    valid, and he has committed a haraam action. 

    3 – 

    The Shaafa’is are of the view that taking back is not valid 
    unless done verbally, and it is not valid by means of actions at all, 
    whether it is by means of intercourse and the things that lead to it and 
    regardless of whether the action was accompanied by the intention to take 
    her back or not. 

    4 – 

    The Hanbalis are of the view that taking back by means of 
    intercourse is valid whether the husband intended to take her back or not. 
    As for the things that lead to intercourse, they cannot be a means of taking 
    her back, according to the correct view of this madhhab. 

    See: Tabyeen al-Haqaa’iq (2/251), Haashiyat Ibn 
    ‘Aabideen (3/399), al-Kharshi ‘ala Khaleel (4/81), Haashiyat 
    al-Bujayrimi (4/41), al-Insaaf (9/156) and Mataalib Ooli 
    (5/480). 

    The most likely to be correct is the second view, that 
    intercourse counts as taking the wife back if it is done with the intention 
    of taking her back. 

    Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said: 
    The second view is that intercourse does not count as taking her back unless 
    there is the intention of taking her back, because simply having intercourse 
    may be done by a man with a non-mahram woman, as in the case of zina. This 
    man’s desire may have been provoked, or he may have seen her adorned and 
    been unable to control himself, so he had intercourse with her, without 
    intending or wanting to take her back as his wife and without having any 
    intention of going back to her. According to this view, having intercourse 
    does not count as taking her back unless there was the intention to do so. 
    This is the correct view and it was the view favoured by Shaykh al-Islam Ibn 
    Taymiyah (may Allaah have mercy on him) because intercourse may take place 
    with the desire to take her back, so it is done with the intention of taking 
    her back, or it may be simply intercourse as the result of desire, so it 
    does not indicate that he is taking her back. 

    The correct view is that taking the wife back is not done 
    merely by having intercourse, unless it is his intention to take her back, 
    and he regards it as permissible on the basis that she is his wife. If that 
    is the case, then it is taking her back, but according to this view, if he 
    has intercourse with her without intending to take her back, and she has a 
    child as the result of this intercourse, is it to be regarded as his child? 
    The answer is yes, it is his child, because this case of intercourse is not 
    clear-cut, and because she was his wife as her ‘iddah had not yet ended. So 
    he is not subject to the hadd punishment for zina, rather he should be given 
    a disciplinary punishment (ta’zeer). End quote from al-Sharh al-Mumti’ 
    (13/189). 

    The fuqaha’ regarded it as mustahabb to bring witnesses to 
    his taking back his wife, because Allaah says (interpretation of the 
    meaning): 

    “Then when they are about to attain their term appointed, 
    either take them back in a good manner or part with them in a good manner. 
    And take as witness two just persons from among you (Muslims). And establish 
    the testimony for Allaah. That will be an admonition given to him who 
    believes in Allaah and the Last Day. And whosoever fears Allaah and keeps 
    his duty to Him, He will make a way for him to get out (from every 
    difficulty)”

    [al-Talaaq 65:2]

    If a divorced woman refuses to have intercourse with her 
    husband until his taking her back has been witnessed, some of the fuqaha’ 
    regarded that as a sign of her being smart and mature. Al-Kharashi said in 
    his Sharh ‘ala Mukhtasar Khaleel (4/87): If a man divorces his wife 
    recovably [i.e., first or second talaaq], then he takes her back and wants 
    to have intercourse with her, and she refuses to do that until after the 
    taking-back has been witnessed, it is her right to do so, and it is 
    indicative of her wisdom, and she is not being disobedient towards her 
    husband, rather she will be rewarded for this refusal. End quote. 

    Secondly: 

    This husband has to repent to Allaah, may He be exalted, from 
    having had intercourse with his divorced wife without intending to take her 
    back, and he should acknowledge the child as his if pregnancy resulted from 
    that. He should think again about the divorce, because it may be better for 
    him to take his wife back and look after her and the child he has from her. 

    Thirdly: 

    If the matter is referred to the shar’i judge and he rules as 
    he sees fit, then his ruling is binding on both partners, because the ruling 
    of the qaadi overrides any difference of scholarly opinion. 

    As you are in a western country where there are no shar’i 
    judges, we think that a man who has knowledge of Islam and fiqh should judge 
    between you. [You can get in touch with such a person through an Islamic 
    centre], and he may judge on the basis of what he knows of the rulings on 
    this issue, and his ruling will be binding like that of a shar’i judge. 

    And Allaah knows best.