A simple and efficient method for the dimerization of primary thioamides into 1,2,4-thiadiazoles using tert-butyl nitrite is described. The optimized condition was also found to be suitable for the dimerization of benzoselenoamides into 1,2,4-selenadiazoles. All the reactions proceed smoothly at room temperature and gave the desired products in excellent yields in a short span of time.