The bromination of 4-acetyl-2-methylimidazole (I) with Br2 in 48% HBr at 70 C gives 4-bromoacetyl-2-methylimidazole (II), which is then cyclized with amidinothiourea (III) in refluxing acetone.