Anal Sex in Islam: Permissible?
Question

Please help me for finding the truth. In Al-Bukhari, hadiths Nos. 4170 & 4171, it is said that anal sex is halal. But you said (in mail A & Q) that it's haram. Now I'm confused.
I want to know the truth. Is anal sex haram or not? Please respond to my question.
Praise be to Allah.Hadiths on the prohibition of anal sex in Islam
There are many sahih ahadith which show that anal sex in is haram in Islam, such as the following: 
1 –Abu Hurayrah (may Allah be pleased with him) reported that the Messenger of Allah (peace and blessings of Allah be upon him) said: “The one who has intercourse with his wife in her back passage has disavowed himself of that which was revealed to Muhammad (peace and blessings of Allah be upon him).” Narrated by Abu Dawud (3904); classed as sahih by al-Albani in Sahih Abi Dawud. 
2 – Ibn 'Abbas (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Allah will not look at a man who has intercourse with a woman in her back passage.” Narrated by al-Tirmidhi (1165); classed as sahih by Ibn Daqiq al-‘Eid in al-Ilmam (2/660) and by al-Albani in Sahih al-Tirmidhi. 
3 –Khuzaymah ibn Thabit (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Allah is not too shy to tell the truth” three times. “Do not have intercourse with women in their back passages .” Narrated by Ibn Majah (1924); classed as sahih by al-Albani in Sahih Ibn Majah. 
And there are many similar ahadith. Al-Tahhawi (may Allah have mercy on him) said in Sharh Ma'ani al-Athar (3/43): “The reports concerning that reach the level of tawatur.”
Scholars’ views on anal sex in Islam
Hence the views of the scholars are based on these ahadith. 
Al-Mawardi (may Allah have mercy on him) said in al-Hawi (9/319): 
“Because that is the consensus of the Sahabah. It was narrated from ‘Ali ibn Abi Talib, ‘Abd-Allah ibn 'Abbas, Ibn Mas’ud and Abu’l-Darda.”
It says in al-Mughni (7/32): 
“It is not permissible to have intercourse with one’s wife in her back passage according to the majority of scholars, including ‘Ali, ‘Abd-Allah, Abu’l-Darda, Ibn 'Abbas, ‘Abd-Allah ibn ‘Amr and Abu Hurayrah. This was also the view of Sa’id ibn al-Musayyab, Abu Bakr ibn ‘Abd al-Rahman, Mujahid, ‘Ikrimah, al-Shafi'i, ashab al-ray and Ibn al-Mundhir.”   
Refuting the claim that anal sex is permissible in Islam
Some people imagine that it is permissible to have intercourse with one’s wife in her back passage. They understand from the verse (interpretation of the meaning): “Your wives are a tilth for you, so go to your tilth when or how you will” [al-Baqarah 2:223] that Allah has permitted everything in this verse, even intercourse in the back passage. 
This misinterpretation is reinforced for them when they read the hadith narrated by al-Bukhari in his Sahih – and perhaps this is the hadith referred to by the questioner – in which it says: It was narrated that Jabir (may Allah be pleased with him) said: The Jews used to say that if (the man) had intercourse from behind, the child would be born with a squint. Then the verse “Your wives are a tilth for you, so go to your tilth when or how you will” [al-Baqarah 2:223] was revealed.  
But this is a misunderstanding of the verse. Allah says “so go to your tilth when or how you will” which means that all variations of intercourse are permitted, so long as it is in the place of tilth, i.e., the vagina, not the back passage.  So it is permissible for a man to have intercourse with his wife from behind or from in front or lying on their sides so long as it is in the place of tilth and not the back passage. 
The evidence for that is Muslim’s report (1435) of the hadith of Jabir quoted above about the reason for the revelation of this verse, in which it says: If he wishes, when she is lying on her front and if he wishes when she is not lying on her front, so long as that is in only one opening. 
In Abu Dawud’s report of the same hadith (2163) it says:  It was narrated that Muhammad ibn al-Munkadir said: I heard Jabir say: The Jews say that if a man has intercourse with his wife in her vagina from behind, the child will have a squint. Then Allah revealed the words (interpretation of the meaning): “Your wives are a tilth for you, so go to your tilth when or how you will” [al-Baqarah 2:223]. 
In Sunan al-Tirmidhi (2980) in a report which he classed as hasan, it was narrated that Ibn 'Abbas (may Allah be pleased with him) said: ‘Umar came to the Messenger of Allah (peace and blessings of Allah be upon him) and said: O Messenger of Allah, I am doomed! He said: “Why are you doomed?” He said: I changed my direction last night. The Messenger of Allah (peace and blessings of Allah be upon him) did not say anything. Then this verse was revealed to the Messenger of Allah (peace and blessings of Allah be upon him) (interpretation of the meaning): “Your wives are a tilth for you, so go to your tilth when or how you will” [al-Baqarah 2:223]. So approach from the front or the back, but avoid the back passage and the time of menses. Classed as hasan by al-Albani in Sahih al-Tirmidhi. 
These ahadith and reports explain what is meant by the verse. So it is not permissible for the Muslim to go beyond that and understand it in ways that are not indicated by the reports or by linguistic usage. 
Ibn al-Qayyim (may Allah have mercy on him) said in Zad al-Ma'ad (4/261): 
“The verse indicates that it is haram to have intercourse with her in her back passage for two reasons. The first is that it is permitted to have intercourse with her in the tilth, which is the place of birth, and not in the anus which is the place of filth. The place of tilth is what is referred to in the verse “then go in unto them as Allah has ordained for you”. [al-Baqarah 2:222]. 
The second reason is that Allah says “when or how you will” i.e., however you wish, from the front or from the back. Ibn 'Abbas said: “go to your tilth” means the vagina.” 
Al-Bukhari’s narration on anal sex
Perhaps the question is also referring to what al-Bukhari narrated from Nafi’ from Ibn ‘Umar (may Allah be pleased with him): “so go to your tilth when or how you will”; he said: “He may approach her from …” 
Ibn Hajar said in Fath al-Bari (8/189): 
“This is how it appears in all the texts. It does not mention what comes after the word “from”.”
And he quoted what is mentioned in some reports elsewhere than in Sahih al-Bukhari, that Ibn ‘Umar said:  He may approach her in her back passage. 
Commentary on Al-Bukhari’s narration on anal sex
But the scholars answered that in two ways: 
1 – That it was a mistake on the part of some of those who narrated it from Ibn ‘Umar, and they understood from it that it was permissible to have intercourse in the back passage, when in fact he was narrating that it is permissible to have intercourse with one's wife in her vagina from behind, based on what is mentioned in sahih reports from him that he regarded it as haram to have intercourse with one’s wife in her back passage. And al-Nasai narrated in al-Sunan al-Kubra (5/315) with a sahih isnad that Ibn ‘Umar was asked about that and he said: Would a Muslim do that?! 
Ibn al-Qayyim (may Allah have mercy on him) said in Tahdhib al-Sunan (2/146): 
“It is narrated in a sahih report that he interpreted the verse as referring to intercourse in the vagina coming from the back, which is what was narrated from Nafi’. Those who thought that Nafi’ approved of intercourse in the back passage are gravely mistaken; rather what he meant was having intercourse from the back in the vagina. Thus they were confused when they thought that when he said “from the back” he meant the back passage; but what he meant by that was coming from the back  but putting it in the place of intercourse, namely the vagina. Those people were confused when they understood the words of Nafi’ “from the back” as meaning “in the back (passage)”.”
The second answer is: 
That this was ijtihad on the part of Ibn ‘Umar (may Allah be pleased with him) about the meaning of the verse. The Sunnah and the views of all the Sahabah indicate that it was an incorrect ijtihad. Abu Dawud (2164) narrated, in a report that was classed as hasan by al-Albani in Sahih Abi Dawud, that Ibn 'Abbas said: 
Ibn ‘Umar – may Allah forgive him – imagined, and this was a tribe of the Ansar who had been idol-worshippers, along with this tribe of the Jews, who were people of the Book, and thought that they (the Jews) were superior to them in knowledge; they used to follow their examples in many of their deeds.. The people of the Book did not have intercourse with their wives except on their sides, and that was most concealing for the woman. This tribe of the Ansar had adopted that from them. And this tribe of Quraysh used to make the woman lie in whatever position they wanted and enjoy them in various ways. When the Muhajirun came to Madinah, one of their men married a woman of the Ansar, and he went to do that with her but she objected and said: We have intercourse lying on our sides, so do that or keep away from me. Their problem got worse until news of that reached the Messenger of Allah (peace and blessings of Allah be upon him) and Allah revealed the words (interpretation of the meaning): “Your wives are a tilth for you, so go to your tilth when or how you will” [al-Baqarah 2:223]., i.e., from the front or the back or lying, meaning the place of birth. 
This could support the reports that Ibn ‘Umar used to say that it was permissible to have intercourse in the back passage, but then perhaps he came back to the correct view, after Ibn ‘Abbas or someone else explained to him the reason why this verse was revealed and what its correct meaning was. Hence it is proven – as stated above – that he said that it was haram, and he said: Would a Muslim do that?! 
To conclude: Islam forbids this action, and there is nothing to indicate that it is permissible. The one who thinks that there is anything in the Quran and Sunnah to indicate that is mistaken. 
And Allah knows best.