It was first the capital of the Wuyue Kingdom from 907 to 978 during the Five Dynasties and Ten Kingdoms period. Named Xifu (西府) at the time,[17] it was one of the three great bastions of culture in southern China during the tenth century, along with Nanjing and Chengdu.[18] Leaders of Wuyue were noted patrons of the arts, particularly of Buddhist temple architecture and artwork. The dyke built to protect the city by King Qian Liu gave the Qiantang its modern name.[19] Hangzhou also became a cosmopolitan center, drawing scholars from throughout China and conducting diplomacy with neighboring Chinese states, and also with Japan, Goryeo, and the Khitan Liao dynasty.