The city was the capital of the former Bhopal State .
It is the headquarters of Bhopal District .