# Hang Prefecture

Hangzhou or Hang Prefecture (589–1129) was a zhou (prefecture) in imperial China located in modern northern Zhejiang, China, around modern Hangzhou. The prefecture was called Yuhang Commandery from 607 to 621 and from 742 to 758. Hang Prefecture was the capital of the Wuyue kingdom (907–978), inside which it was known as Xi Prefecture (Western Prefecture), and during its last years of the kingdom, as Qiantang Prefecture.
Hang Prefecture sat at the head of the Hangzhou Bay, which opens to the East China Sea. It was also the southern terminus of the Grand Canal and the eastern terminus of the Qiantang River. During the Northern Song (960–1127) it was the capital of Liangzhe Circuit. In 1129 it became Lin'an Prefecture, which would become the capital of the Southern Song (1127–1279) in 1138.

## Counties

For most of its history, Hang Prefecture administered the following 7–9 counties (縣), some of whose names changed frequently:
| # | Sui dynasty | Tang dynasty | Wuyue | Song dynasty | Modern location |
| 1 | Qiantang (錢唐) | Qiantang (錢塘) | Qiantang (錢塘) | Qiantang (錢塘) | Hangzhou (City Proper) |
| 2 | Qiantang (錢唐) | Qiantang (錢塘) | Qianjiang (錢江) | Renhe (仁和) | Hangzhou (City Proper) |
| 3 | Yuhang (餘杭) | Yuhang (餘杭) | Yuhang (餘杭) | Yuhang (餘杭) | Yuhang District, Hangzhou |
| 4 | Fuyang (富陽) | Fuyang (富陽) | Fuchun (富春) | Fuyang | Fuyang District, Hangzhou |
| 5 | Xincheng (新城) | Xincheng (新城) | Xindeng (新登) | Xincheng | Fuyang District, Hangzhou |
| 6 | Lin'an (臨安) | Lin'an (臨安) | Anguo (安國) | Lin'an | Lin'an City |
| 7 | Yuqian (於潜) | Yuqian | Yuqian | Yuqian | | Lin'an City |
| 8 | Yuqian (於潜) | Zixi (紫溪), 686–696Wulong (武隆), 696–698Wuchong (武崇), 698–705Tangshan (唐山), 705–908 | Jinchang (金昌), 908–923Tangshan, 923–942Hengshan (橫山), 942Wuchang (吳昌), 942–979 | Changhua (昌化) | Lin'an City |
| 9 | Yanguan (鹽官) | Yanguan (鹽官) | Yanguan (鹽官) | Yanguan (鹽官) | Haining City |

## History
### During Sui and the Sui–Tang transition (589–622)

In 587, the southern Chen dynasty (557–589) created Qiantang Commandery (錢唐郡), which administered four counties. When the northern Sui dynasty (581–618) conquered the Chen dynasty in 589, Qiantang Commandery was renamed to Hang Prefecture.
In 606, the City Walls were built.
In 607, Emperor Yang of Sui renamed hundreds of prefectures. Hang Prefecture was renamed to Yuhang Commandery.
In 609, the Grand Canal was completed.
During the transition from Sui to Tang, the warlord Shen Faxing first held Yuhang Commandery in the confusion following the assassination of Emperor Yang in 618. In 620, he was defeated by the warlord Li Zitong, who took over his territory.

### During Tang and Wuyue (622–978)

The Tang dynasty (618–907) did not occupy the prefecture until December 611, when the Tang army under Li Fuwei destroyed Li Zitong's defense in Yuhang. The Tang renamed Yuhang Commandery to Hang Prefecture.
In 653, the woman rebel leader Chen Shuozhen attacked Hang Prefecture and took Yuqian.
In the late Tang dynasty, the rebel Huang Chao briefly occupied Hang Prefecture twice, first in 878 and later in 880. In the late 870s, local militias were formed to resist the rebel Wang Ying, and among the soldiers were Hang Prefecture natives Dong Chang and Qian Liu.
In 882, warlord Liu Hanhong, who was based in neighboring Yue Prefecture, wanted to take over Hang Prefecture from Dong Chang. He was soundly defeated by Dong Chang's force led by Qian Liu. In 886, Dong Chang promised Hang Prefecture to Qian Liu if he could destroy Liu Hanhong; Qian Liu did just that, capturing Liu Hanhong and taking over his territory. In 887, Qian Liu took over Hang Prefecture while Dong Chang went to Liu Hanhong's former base in Yue Prefecture. (Qian Liu later attacked and killed Dong Chang in 896.)
Qian Liu began a series of massive construction projects in Hang Prefecture in 890. These include the fortification of city walls and the construction of a dam to control the Qiantang River. After the Tang dynasty collapsed in 907, Qian Liu remained independent throughout the ensuing Five Dynasties period, even though like before he continued to pay tributes to the imperial courts in Kaifeng Prefecture (or Henan Prefecture during Later Tang).
During the Wuyue kingdom, many Buddhist pagodas were built in Hang Prefecture. These include Baochu Pagoda (963), Liuhe Pagoda (970), and Leifeng Pagoda (975).

### During the Song dynasty (978–1129)

The inventor Bi Sheng was active in Hang Prefecture, as was Shen Kuo.
In December 1120, rebel Fang La took Hang Prefecture and held it until March 1121.
In March 1129, Zhao Gou fled the north and arrived with his followers in Hang Prefecture.

## Prefects

Source:

### Tang dynasty

Note: From 742 to 758 Hang Prefecture was known as Yuhang (Commandery).
* Shuang Shiluo (雙士洛), 620s
* Dugu Yishun (獨孤義順), 620s
* Shi Lingqing (史令卿), 620s
* Yang Xingju (楊行矩), 620s
* Li Hongjie (李弘節), 628?–?
* Yuan Shenwei (元神威), 630s?
* Liu Chuxian (柳楚賢), 639?–640?
* Pan Qiuren (潘求仁), 640–?
* Xue Wanche (薛萬徹), 644?–645?
* Cui Yuanjiang (崔元獎), 694–?
* Li Ziyi (李自挹), 690s
* Pei Quan (裴惓), 704–706/707?
* Song Jing, 706/707–709?
* Liu Youqiu, 714–715
* Xue Zimian (薛自勉), ?
* Wei Cou (韋湊), 722–?
* Huangfu Zhong (皇甫忠), 722–723
* Yuan Renjing (袁仁敬), 725–?
* Zhang Shouxin (張守信), 746–748
* Li Limu (李力牧), 750–?
* Li Chuyou (李處祐), 750–?
* Yan Sunzhi (嚴損之), 750–?
* Liu Yan, 756–757
* Cui Huan, 757–?
* Hou Lingyi (侯令儀), 759–760
* Zhang Boyi (張伯儀), 765–767
* Liu Xian (劉暹), 767–?
* Du Ji (杜濟), 773–777
* Yuan Quanrou (元全柔), 780–781
* Li Bi, 781–784
* Yin Liang (殷亮), 785–?
* Fang Rufu (房孺復), 788–?
* Yu Shao (于邵), 792–?
* Li Qi, 794–797
* Pei Changdi (裴常棣)
* Lu Ze (陸則)
* Su Bian (蘇弁), 803–805
* Han Gao (韓皋), 805–?
* Zhang Gang (張綱), 805–?
* Du Zhi (杜陟), 807–?
* Yang Ping (楊憑), early 9th century
* Lu Yuanfu (盧元輔), 813–815
* Yan Xiufu (嚴休復), 817–?
* Yuan Yu (元藇), 820–?
* Bai Juyi, 822–824
* Li Yougong (李幼公), 826–?
* Cui Shan (崔鄯), 828–?
* Lu Yi (路異), 832–?
* Yao He, 835–838?
* Li Zongmin, 838–?, 843–?
* Li Zhongmin (李中敏), 840
* Pei Yizhi (裴夷直), 840–841
* Li Yuan (李遠), 858–?
* Cui Juan (崔涓), 859–?
* Cui Yanzeng (崔彦曾), 861–?
* Lu Shenzhong (路審中), 881
* Dong Chang, 881–886
* Qian Liu, 887–907

### Wuyue

* Sun Zhi (孫陟)

### Song dynasty

* Fan Min (范旻), 978
* Zhai Shousu (翟守素), 979–982
* Li Jining (李繼凝), 980s
* Liu Zhixin (劉知信), 989–993
* Wang Huaji (王化基), 993–995
* Wei Yu (魏羽), 995–997
* Zhang Quhua (張去華), 997–999
* Zhang Yong (張詠), 999–1002
* Song Taichu (宋太初), 1002
* Wang Zhonghua (王仲華), 1002–1003
* Xue Ying (薛暎), 1003–1007
* Wang Ji (王濟), 1007–1010
* Qi Lun (戚綸), 1010–1014
* Xue Yan (薛顔), 1014–1016
* Ma Liang (馬亮), 1016
* Wang Qinruo, 1019–1020
* Wang Sui (王隨), 1021–1022
* Li Ji (李及), 1022–1023
* Zhou Qi (周起), 1023–1026
* Hu Ze (胡則), 1026–1028
* Li Zi (李諮), 1028–1029
* Zhu Xun (朱巽), 1029–1030
* Chen Congyi (陳從易), 1030–1031
* Zhang Guan (張觀), 1031–1033
* Hu Ze (2nd appointment), 1033–1034
* Zheng Xiang (鄭向), 1034–1036
* Yu Xianqing (俞獻卿), 1036–1038
* Liu Zhi (柳植), 1038–1039
* Sima Chi (司馬池), 1039–1040
* Zhang Ruogu (張若谷), 1040–1041
* Zheng Jian (鄭戩), 1041–1042
* Jiang Tang (蔣堂), 1042–1043
* Yang Xie (楊偕), 1043–1045
* Fang Xie (方偕), 1045–1047
* Jiang Tang (2nd appointment), 1047–1049
* Fan Zhongyan, 1049–1050
* Zhang Fangping (張方平), 1050–1051
* Lü Zhen (呂溱), 1051–1053
* Ding Yongsun (丁永孫), 1053
* Li Dui (李兌), 1053
* Sun Gai (孫沔), 1054–1056
* He Zhongli (何中立), 1056–1057
* Mei Zhi (梅摰), 1057–1058
* Tang Xun (唐詢), 1058–1060
* Shi Changyan (施昌言), 1060–1062
* Shen Gou (沈遘), 1062–1064
* Wang Qi (王琪), 1064–1065
* Cai Xiang, 1065–1066
* Hu Su (胡宿), 1066–1067
* Lü Zhen (2nd appointment), 1067
* Zu Wuze (祖無擇), 1067–1069
* Zheng Xie (鄭獬), 1069–1070
* Zhao Bian (趙抃), 1070–1071
* Shen Li (沈立), 1071–1072
* Chen Xiang (陳襄), 1072–1074
* Yang Hui (楊繪), 1074
* Shen Qi (沈起), 1074–1076
* Su Song, 1076–1077
* Zhao Bian (2nd appointment), 1077–1079
* Deng Runfu (鄧潤甫), 1079–1081
* Zhang Shen (張詵), 1081–1085
* Pu Zongmeng (蒲宗孟), 1085–1087
* Yang Hui (2nd appointment), 1087–1088
* Xiong Ben (熊本), 1088–1089
* Su Shi, 1089–1091
* Lin Xi (林希), 1091–1092
* Wang Cun (王存), 1092–1094
* Chen Xuan (陳軒), 1094–1096
* Han Zongdao (韓宗道), 1096–1097
* Li Cong (李琮), 1097–1098
* Lin Xi (2nd appointment), 1098–1099
* Feng Ji (豐稷), 1099–1100
* Lü Huiqing (呂惠卿), 1100–1101
* Gong Yuan (龔原), 1001
* Chen Xuan (2nd appointment), 1101–1102
* Zou Hao (鄒浩), 1102
* Lü Huiqing (2nd appointment), 1102
* Jiang Zhiqi (蔣之奇), 1102–1103
* Yuwen Changling (宇文昌齡), 1103–1105
* Zhong Chuan (鍾傳), 1105
* Wang Ning (王寧), 1105
* Zeng Xiaoguang (曾孝廣), 1105
* Lü Huiqing (3rd appointment), 1106–1107
* Zeng Xiaoyun (曾孝藴), 1107
* Zhu Yan (朱彦), 1107–1108
* Wang Huanzhi (王渙之), 1108–1109
* Xi Zhen (席震), 1109
* Cai Ni (蔡薿), 1109
* Zhang Shangying (張商英), 1110
* Liu Kui (劉逵), 1110
* Zhang Ge (張閣), 1110–1111
* Pang Yinsun (龐寅孫), 1111–1114
* Dong Zhengfeng (董正封), 1114–1115
* Li Yan (李偃), 1115–1116
* Zhao Meng (趙㠓), 1116–1119
* Zhao Ting (趙霆), 1119–1120
* Zeng Xiaoyun (2nd appointment), 1121
* Yu Yi (虞奕), 1121
* Cai Ni (2nd appointment), 1121–1122
* Weng Yanguo (翁彦國), 1122–1125
* Tang Ke (唐恪), 1125–1126
* Weng Yanguo (2nd appointment), 1126
* Mao You (毛友), 1126
* Ye Mengde (葉夢得), 1126–1127
* Qian Boyan (錢伯言), 1127
* Shiqi Fu (侍其傅), 1127–1128
* Kang Yunzhi (康允之), 1128–1129