In 1878, the Congress of Berlin placed the Bosnia Vilayet of the Ottoman Empire under Austro-Hungarian occupation. The region was formally annexed in 1908 and was governed by Austria and Hungary jointly through the Imperial and Royal Ministry of Finance's Bosnian Office (). The Government of Bosnia and Herzegovina was headed by a governor (), who was also the commander of the military forces based in Bosnia and Herzegovina. The executive branch was headed by a National Council, which was chaired by the governor and contained the governor's deputy and chiefs of departments. At first, the government had only three departments, administrative, financial and legislative. Later, other departments, including construction, economics, education, religion, and technical, were founded as well.