 Hayes was elected as Mayor of Baltimore on May 2, 1899, defeating the incumbent Republican Mayor William T. Malster by 8,748 votes.Hayes lost in the Democratic primary to Robert McLane who succeeded him as Mayor in 1903.Thomas G. Hayes died on August 27, 1915.