Tafsir Ibn Kathir -> Surah An-Nahl -> The Prohibition on taking an Oath for Purposes of Treachery

Then Allah warns His servant against taking oaths as means of deception, i.e., using them for treacherous purposes, lest a foot should slip after being firmly planted. This is an analogy describing one who was on the right path but then deviated and slipped from the path of guidance because of an unfulfilled oath that involved hindering people from the path of Allah. This is because if a disbeliever were to find that after having agreed to a covenant, then the believer betrayed him, then the believer will have hindered him from entering Islam. Thus Allah says:

﴿وَتَذُوقُواْ الْسُّوءَ بِمَا صَدَدتُّمْ عَن سَبِيلِ اللَّهِ وَلَكُمْ عَذَابٌ عَظِيمٌ﴾

(and you taste the evil of having hindered from the path of Allah, and you will suffer a terrible punishment.)