Is praying two rak'ahs obligatory upon arriving at the destination of a vow to walk to a mosque?
General Chapter
Al-Mughni
Book of Vows
Primary text
It is obligatory for the person who vows to walk to a specific mosque to pray two rak'ahs upon reaching that place. This is because the intention of the vow is obedience and drawing near to Allah, and this is achieved through prayer, thus it is encompassed within the vow. This is analogous to how a vow to perform pilgrimage to the Ka'bah necessitates performing one of the prescribed rites (Umrah or Hajj rituals), and vowing to pray in one of the two mosques is like vowing to walk there.
Supporting text
Abu Hanifa holds that prayer is not specifically necessitated in a particular place by a vow, whether it is the Ka'bah or elsewhere, because that which has no basis in the revealed law (Shari'ah) cannot be made obligatory by a vow, evidenced by the fact that vowing to pray in other mosques does not necessitate it.