During the Qing dynasty (1644–1911) Tianjin Prefecture or Zhou (州) was established in 1725, and Tianjin County was established within the prefecture in 1731. Later it was upgraded to an urban prefecture or Fu (府) before becoming a relay station (駐地) under the command of the Viceroy of Zhili.