A study was carried out on the regioselectivity of the electrophilic halocyclization of 4-allyl-5-substituted-2,4-dihydro-3H-1,2,4-triazol-3-thiones by the action of bromine and iodine. It was revealed which factors influence the structure of the reaction products. 6-(Bromomethyl)-3-substituted-5,6-dihydrothiazolo[2,3-c]-[1,2,4]triazoles have been shown to be good starting materials for the synthesis of polyheterocyclic systems containing a 1,2,3-triazole ring. In contrast, 6-iodo-3-substituted-6,7-dihydro-5H-[1,2,4]triazolo[3,4-b][1,3]thiazines do not undergo azidation. Due to the dehydrohalogenation reaction, a double bond is formed.