'Detained mayors diverted tax funds for terror attacks'