Following the US-led coalition's invasion of Afghanistan in late 2001, Hamdard resumed a weak alliance with Dostum's forces. On the eve of the presidential election in October 2004, he pledged support to Karzai. He became governor of Baghlan, and later Jowzjan.