Ruling on one who swears about something based on what he thinks is likely to be the case, then it turns out to be otherwise
Question

What is the ruling on one who swears by Allah about something he does not know? Is that halaal or haraam? Is it permissible if he is certain? For example, if someone says to him: “Shaykh So and so did such and such,” and he replies, “No, by Allah, he did not do such and such,” even though he does not know what the shaykh did, but he is certain that he did not do this thing or, for example, if he swears about some matter of the unseen, what is the ruling?.
Praise be to Allah.One of the following scenarios must be true in the case of the one who swears this oath: 
-Either he knows that what he is swearing to is true; in this case his oath is true and he does not have to do anything
-or he knows that he is lying in his oath; in this case he is sinning and committing a major sin
-or he is swearing the oath thinking it most likely that it is false; in this case he is breaking his oath, even if it turns out to be as he swore it was
-or he is swearing the oath thinking it most likely that it is true; in this case he does not have to do anything, even if it turns out to be other than what he swore to, because he only swore the oath on the basis of what he thought, thinking that he was telling the truth in his oath
-or he swore about something without any knowledge of it; in this case he is sinning, because he swore an oath about something that was unknown to him.
So if someone says, for example, that So and so did not do such and such, because he is certain or he thinks it most likely that he did not do it, because of what he knows about his religious commitment or attitude, or about his situation that would prevent him from doing that, then he is swearing on the basis of what he thinks is most likely in his view. In this case there are no consequences for him from his oath. 
Al-‘Imraani ash-Shaafa‘i (may Allah have mercy on him) said in al-Bayaan (10/553): 
What one thinks most likely to be the case comes under the same rulings as what one is certain about. End quote. 
Al-Bukhaari (2600) and Muslim (1111) narrated that Abu Hurayrah (may Allah be pleased with him) said:
A man came to the Messenger of Allah (blessings and peace of Allah be upon him) and said: I am doomed! He said: “Why is that?” He said: I had intercourse with my wife in Ramadaan. He said: “Do you have the means to free a slave?” He said: No. He said: “Can you fast for two consecutive months?” He said: No. He said: “Do you have the means to feed sixty poor persons?” He said: No. Then a man of the Ansaar brought a large basket of dates and he (the Prophet (sa)) said: “Take this and give it in charity.” He said: Is there anyone poorer than us, O Messenger of Allah? By the One Who sent you with the truth, there is no family between the two lava-fields that is more in need of it than us. He said: “Go and feed it to your family.” 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: 
This indicates that it is permissible to swear an oath based on what one thinks is most likely to be the case; this is based on the fact that the man said: “By Allah, there is no family between the two lava fields that is poorer than us.” There can be no doubt this man had not gone to every family to ask them; rather this is what he thought most likely to be the case and he swore an oath based on what he thought was most likely.
End quote from Sharh al-Kaafi, 4/90 
Ibn al-Qayyim (may Allah have mercy on him) said: 
Al-Qaadi said: If (a person) find in his father’s records that So and so owes him a debt, it is permissible for him to claim it, on the grounds that he thinks it most likely that this is true. Ibn al-Qayyim said: And he may swear an oath to that effect.
End quote from I‘laam al-Muwaqqi‘een, 4/129 
Ibn ‘Uthaymeen said: 
With regard to the one who swears an oath based on what he thinks most likely to be the case, then it turns out to be otherwise, there is nothing wrong with that, such as if he swore that something happened on the basis of what he thought, then it turned out that it was not like that – there is no sin on him for that, because he only swore the oath based on what he thought and at the time of swearing the oath he was sincere in what he thought most likely to be the case. Another example is if he said: By Allah, So and so will surely come tomorrow, or he will surely come back from his trip tomorrow, based on what he thinks, then that person does not come; there is no sin on him according to the more correct opinion and he does not have to offer expiation. That is because he only swore that oath on the basis of what he thought.
End quote from Fataawa Noor ‘ala ad-Darb, 21/2 
Shaykh Saalih al-Fawzaan was asked: 
What is the ruling on one who swears that something happened but he does not know whether it happened? It so happened that we did something that upset someone, and he asked our father whether we had done that thing, but our father denied it and swore that we were innocent of that, even though we had done it, but our father does not know. Is it permissible for us to offer expiation without him knowing, or should we tell him and let him offer expiation for himself, or is there no sin in that? 
He replied: 
Firstly: The Muslim should guard his oaths and not hasten to swear oaths except when necessary and when he is certain of what he is swearing to. But if someone swears that something happened or did not happen, based on what he thinks most likely to be the case, then it turns out otherwise, there is no sin on him, because he swore on the basis of what he thought was most likely to be the case. So there is no sin on him but this is a kind of idle talk that includes an oath. 
But if he swore a false oath deliberately, then he is sinning in that case; however he does not have to offer expiation, but he has sinned and he should ask Allah for forgiveness and repent to Him, and Allah will accept the repentance of the one who repents. With regard to expiation, it is not required except in the case of an oath that was sworn with regard to something in the future that was possible.
End quote from al-Muntaqa min Fataawa al-Fawzaan, 96/1-2 
And Allah knows best.