All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Among the conditions for the validity of Tawaaf is intention but it is not an obligation to have intention throughout the whole Tawaaf; rather, it is just an obligation to presume its continuation in a way that the person performing Tawaaf should not do something that negates it. So, if a person intends to stop the Tawaaf before completing it, then what he did after that without intention is not taken into account as the Prophet said: "Indeed, actions are judged by intentions.”
Al-Abbaadi from the Shaafi’i school, said in his book “Hawaashi Tuhfat-ul-Muhtaaj”: “If a woman got near him (the man performing Tawaaf) because of the crowd and he quickened his steps or that he moved to another side out of fear that his ablution would be invalidated by touching her, then his Tawaaf is affected (by covering this distance) if he did not have the intention of Tawaaf.”
Therefore, since this man interrupted the intention of Tawaaf before its completion, his Tawaaf is not complete because some of it took place without intention and that step (at the end of his Tawaaf) is not considered from his Tawaaf as he intended with it other than the Tawaaf as we already explained.
Allaah Knows best.