Xianyang (Chinese: 咸阳; pinyin: Xiányáng) is a Chinese city that was the capital of China in the Qin dynasty. It is a prefecture in modern-day Shaanxi province, on the Wei River, and is located a few kilometers upstream (west) from Xi'an. Integrated into the Xi'an metropolitan area, one of the main urban agglomerations in inland China, with more than 7.17 million inhabitants, its built-up area made of 2 urban districts (Qindu and Weicheng) was 945,420 inhabitants at the 2010 census. It has a total area of 10,213 square kilometres (3,943 sq mi).