With the removal of the provincial capital to Murshidabad (1704) and the weakening of the muslin industry, Dhaka entered a period of decline. It passed under British control in 1765 and was constituted a municipality in 1864, but it continued to lose prominence until it was designated the capital of Eastern Bengal and Assam province (1905–12). During the early 20th century Dhaka served as a commercial center and seat of learning. Following the end of British rule, when the region became a part of Pakistan, it was named the capital of East Bengal province (1947) and of East Pakistan (1956). Dhaka suffered heavy damage during the war of independence in 1971 but emerged as the capital of Bangladesh.