Qufu ( ; ) is a county-level city in southwestern Shandong province, East China. It is located about south of the provincial capital Jinan and northeast of the prefectural seat of Jining. Qufu has an area of 815 square kilometers, and a total population of 653,000 inhabitants, of which, 188,000 live in urban areas.

Qufu is best known as the hometown of Confucius, who is traditionally believed to have been born at nearby Mount Ni. Qufu, being the capital of Lu and birthplace of Confucius, is known collectively with Zoucheng, the birthplace of Mencius, as "Zoulu". The city contains numerous historic palaces, temples and cemeteries. The three most famous cultural sites of the city, collectively known as San Kong (, are the Temple of Confucius (), the Cemetery of Confucius (), and the Kong Family Mansion (). Together, these three sites have been listed as a UNESCO World Heritage Site since 1994.

Etymology The name Qufu literally means "crooked hill", and refers to a mile-long hill that was part of the city during its time as capital of the state of Lu.

Before the wide adoption of Pinyin, the name of the city (often viewed as a county seat, i.e. Qufu xian) was transcribed in English in a variety of ways, such as Ch'ü-fou-hien, Kio-feu-hien, - Rev. A. Williamson's account of his visit to Qufu in 1865 Kio-fou-hien, Kiu-fu, Kiuh Fow, Keuhfow, Kufow, and Chufou.

Japanese city Gi-Fu (岐阜) was partially named after Qufu. After Oda Nobunaga conquered Inabayama Castle in 1567, he renamed it as Gifu. Gi came from Qishan (岐山), a legendary mountain from which the King Wu of Zhou proclaimed the war against Shang and unified China, whereas fu came from Qufu (曲阜).Gifu tour guide – Outline of Gifu Prefecture . Gifu Prefecture Tourist Federation. Accessed September 9, 2007. Nobunaga chose those characters because he hoped to unify all of Japan and wanted to be viewed as a great mind.

History

Pre Qin era

According to legend, Shennong, one of the Three Sovereigns and Five Emperors, together with his son Shaohao made Qufu their capital.

During the Shang, the area around Qufu was home to the people of Yan (奄), who were counted by the Chinese among the "Eastern Barbarians" or Dongyi. After King Wu of Zhou founded the Zhou dynasty, his younger brother Duke of Zhou, Dan, an official of outstanding merit in the founding of the dynasty, was granted this land and took the title Duke of Lu. He did not, however, remain in Lu himself; he entrusted the rulership of Lu to his son Bo Qin and stayed on at the royal court to help manage the turbulent political situation following King Wu's death.

Along with Pugu (around Binzhou) and Xu (along the Huai River), Yan joined the Shang prince Wu Geng and the Three Guards in their failed rebellion against the Duke of Zhou BC. After the rebels' defeat, the Duke launched punitive campaigns against the Dongyi, forcing their submission and placing their territory under loyal nobles.

The territory of the Yan became part of the state of Lu, who made Qufu their capital throughout the Spring and Autumn period. This city had walls considerably larger than the present Ming-era fortifications, including more land to the east and north. In 249 BC, State of Lu was conquered by Chu, and County of Lu was established in this region with administrative center in Qufu.

Imperial era

After Qin Shi Huang unified China, Qufu was put under the Xue Commandery (whose name was kept today as Xuecheng District, Zaozhuang). In 155 BC, Emperor Jing of Han dynasty created a separate Principality of Lu (魯國), and granted it to his son Liu Yu. Yu's descendants held Lu until the Xin dynasty, when the prince was deposed and Lu became a commandery (Lu Commandery, 魯郡). In 2 AD, the principality consisted of 6 counties: Lu (魯, which is Qufu), Bian (卞), Wenyang (汶陽), Fan (蕃), Zou (騶) and Xue (薛). The Lu Commandery existed until 758, when it was transformed into Yan Prefecture. During the Tang dynasty and the early days of the Song dynasty, the city was centered around the present-day Temple of Duke Zhou, at the northeastern corner of today's walled city. At 1012, Qufu was renamed to Xianyuan County (), and relocated to the new site, some east of today's walled city, next to the supposed birthplace of the legendary Yellow Emperor and the tomb of his son Shaohao. A temple in honor of the Yellow Emperor was built there; all that remains today are two giant stelae (the Shou Qiu site).Bo Chonglan et al. (2002), p. 109

After the conquest of the northern China by the Jurchens, the new Jin dynasty renamed Xianyuan back to Qufu (in 1142), but the city stayed at its Song location. It was not until the reign of the Jiajing Emperor of the Ming dynasty (1522) that the present-day city wall was built. The site of the city in 1012–1522 is now Jiuxian Village ().

During the Southern Song dynasty the descendant of Confucius at Qufu, the Duke Yansheng Kong Duanyou fled south with the future Song Emperor Gaozong to Quzhou in Zhejiang, while the newly established Jin dynasty in the north appointed Kong Duanyou's brother Kong Duancao who remained in Qufu as Duke Yansheng.** From that time up until the Yuan dynasty, there were two Duke Yanshengs, one in the north in Qufu and the other in the south at Quzhou. An invitation to come back to Qufu was extended to the southern Duke Yansheng Kong Zhu by the Yuan dynasty emperor Kublai Khan. The title was taken away from the southern branch after Kong Zhu rejected the invitation, so the northern branch of the family kept the title of Duke Yansheng. The southern branch still remained in Quzhou where they lived to this day. Confucius's descendants in Quzhou alone number 30,000. The Hanlin Academy rank of Wujing Boshi (五經博士) was awarded to the southern branch at Quzhou by a Ming emperor while the northern branch at Qufu held the title Duke Yansheng. p. 14.https://www.researchgate.net/publication/248653434_The_Ritual_Formation_of_Confucian_Orthodoxy_and_the_Descendants_of_the_Sage p. 575. Kong Ruogu (), also known as Kong Chuan () p. 5. 47th generation* was claimed to be the ancestor of the Southern branch after Kong Zhu died by Northern branch member Kong Guanghuang.Wilson, Thomas A.. 1996. "The Ritual Formation of Confucian Orthodoxy and the Descendants of the Sage". The Journal of Asian Studies 55 (3). [Cambridge University Press, Association for Asian Studies]: 559–84. doi:10.2307/2646446. https://www.jstor.org/stable/2646446 p. 575.

Modern era

During the Late Qing reforms, the Qing government planned to construct a major railroad connecting the North and South, which was known as Tianjin–Pukou Railway (Jinpu Railway), and later merged into Beijing-Shanghai Railway. The originally planned route of the Tianjin–Pukou Railway did not pass through Yanzhou. Instead, it was designed to run from Nanyi, pass through Qufu, cross the Si River, and then proceed directly south to Zouxian and Tengxian. During actual construction, however, the route was altered on the grounds of protecting the Confucian Temple in Qufu: south of Xiemating in Qufu, the railway was diverted southwestward toward Yanzhou, and then turned southeast again south of Yanzhou, forming a large curve in the line.

The German-proposed plan that would have passed through Qufu would have placed the railway only 50 zhang (less than 200 meters) from the Confucius Cemetery (Konglin), which aroused dissatisfaction among some conservative figures, who believed it would damage the site’s feng shui. Moreover, since Qufu was rich in mineral resources, some suspected that Britain and Germany intended to exploit and transport local minerals by rail after the line’s completion. Subsequently, Kong Lingyi, the Duke Yansheng, encouraged by opponents of the proposal, submitted a formal petition citing the need to protect the "sacred veins of the Kong Forest". Following his intervention, the Governor of Shandong memorialized the superintendent of the Jin–Pu Railway, requesting that the original plan be altered to avoid the sacred forest. Local gentry also submitted a joint petition demanding a rerouting in order to protect local railway and mining rights. They argued that “Qufu is surrounded by mountains rich in minerals and has long attracted German attention. From Jining to Zou, however, the land becomes flat plains with no nearby minerals", and therefore insisted that the railway must be diverted westward.

Under mounting pressure, several officials responsible for the northern section of the Jinpu Railway personally traveled to Qufu to survey the route and agreed with Kong Lingyi to shift the line five li westward. Just as construction was about to begin, the magistrate of Ziyang County submitted another petition requesting that the line be routed around eastern Yanzhou to promote local ritual activities. Consequently, the railway authorities moved the line further west to its present alignment, surveyed and designated the site of Yanzhou Prefectural Station, acquired land for station construction, and agreed to build a branch line from Yanzhou to Jining. With this, the controversy over the railway’s rerouting was brought to an end. In 1910, Kong Lingyi was summoned to Beijing to express gratitude to the new emperor Puyi for his handling of the affair and was rewarded with permission to wear a sable-trimmed court robe (帶嗉貂褂).

Although the successful diversion of the railway away from Qufu County was celebrated by conservatives and by Kong Lingyi himself, their actions also drew criticism. Song Huanwu, principal of the Second Shandong Provincial Normal School, once remarked: "When construction of the Jinpu Railway was first proposed, it was originally planned to establish a station in Qufu city. The Duke Yansheng’s household, clinging to superstitious notions of feng shui, strongly opposed this, and the route was therefore changed to Yaocun, eighteen li away from the city. As a result, merchants and travelers were greatly inconvenienced. Consequently, social life within Qufu County remained in a medieval state and failed to undergo modernization."

In 1948, Qufu played a minor role in the Yanzhou Campaign of the Chinese Civil War.

In PRC

The artifacts of the historical sites at Qufu suffered extensive damage during the Cultural Revolution when about 200 staff members and students of Beijing Normal University led by Tan Houlan (, 1937–1982), one of the five most powerful student leaders of the Cultural Revolution, came to Qufu and destroyed more than 6,000 artifacts as part of the campaign to destroy the "Four Olds" in November 1966.Wang Liang, "The Confucius Temple Tragedy of the Cultural Revolution," in Thomas A. Wilson, ed., On Sacred Grounds, (Cambridge: Harvard University Press, 2002)Sang Ye and Geremie R. Barmé (2009): The Fate of the Confucius Temple, the Kong Mansion and Kong Cemetery, China Heritage Quarterly, No. 20, December 2009

The city wall of Qufu was kept until being demolished in 1977; today only the due-south gate, the north gate, and portions of the wall remain. Restoration of the wall began in 2002 and was completed in September 2004.

Besides the renowned "Three Confucian Sites" (San Kong), Qufu is dotted, both within and beyond the city, with countless cultural relics and historic sites: the Temple of Yan Hui, Xixiahou Site, the Temple of the Duke of Zhou, the Chunqiu Academy, the Tombs of the Han Princes of Lu, the Mausoleum of Shaohao, Shimen Temple, and the former site of the Song-dynasty Jingling Palace, among others. In 1982 it was designated a National Famous Historical and Cultural City by the State Council of China.

In 1986 the county was abolished and reconstituted as a city, administered on behalf of the prefecture-level city of Jining. Administrative divisions The city of Qufu is divided into 4 subdistricts, and 8 towns. The city government is located within .