فَسِيحُوا فِي الْأَرْضِ أَرْبَعَةَ أَشْهُرٍ وَاعْلَمُوا أَنَّكُمْ غَيْرُ مُعْجِزِي اللَّهِ ۙ وَأَنَّ اللَّهَ مُخْزِي الْكَافِرِينَ
“So travel freely, [O disbelievers], throughout the land [for] four months, but know that you cannot cause failure to Allah and that Allah will disgrace the disbelievers.”
This ayah is part of the opening of Surat al-Tawba, revealed -- as this event's own description states -- within hours of Abu Bakr RA's Hajj delegation departing Madinah, and proclaimed by Ali ibn Abi Talib RA during that Hajj.