Hu Zongxian (Chinese: 胡宗憲; November 4, 1512 – November 25, 1565), courtesy name Ruzhen (汝貞) and art name Meilin (梅林), was a Chinese general and politician of the Ming dynasty who presided over the government's response to the wokou pirate raids during the reign of the Jiajing Emperor. As supreme commander, he was able to defeat Xu Hai's (徐海) substantial raid in 1556 and capture the pirate lord Wang Zhi the next year through ruses. Despite his accomplishments, Hu Zongxian's reputation had been tarnished by his association with the clique of Yan Song and Zhao Wenhua, traditionally reviled figures in Ming historiography. He was rehabilitated decades after his death and was given the posthumous name Xiangmao (襄懋) by the emperor in 1595.
 He is a direct ancestor of Hu Jintao, General Secretary of the Chinese Communist Party from 2002 to 2012.[better source needed]
 Hu Zongxian was born in the year 1512, in the Hu ancestral village of Longchuan (龍川) in Jixi County, part of Huizhou prefecture of Nanzhili at the time. Today, Longchuan is called Kengkou village (坑口村); Jixi is now part of Anhui province. At the age of 23, he passed the provincial imperial examination and became a juren (舉人). This was followed by him passing the palace examination in 1538, becoming a jinshi (進士) and paving the road to officialdom.
 Hu was first assigned to be the magistrate of Yidu in Shandong province in 1540, where his administration of justice won him the love of the people, who claimed that he brought rains during a drought and magpies to eat the locusts destroying the crops. He raised a thousand volunteer troops from miners out of work and sent them to the northern frontiers under the command of the Shandong grand coordinator Zeng Xian. For this, Hu Zongxian was earmarked for promotion, but he had to retire due to the death of his mother in May 1542 to observe the three years-long period of mourning per Confucian rituals. Two years later, his father also died, and Hu Zongxian stayed at his home village for another three years.
 In 1547, Hu Zongxian reemerged as the magistrate of Yuyao of Zhejiang province (modern Yuyao city, Ningbo). There he became known for his unconventional thinking, such as when he solved the longstanding problem of illegal quarrying on Mt. Shenggui (勝歸山) north of the city by buying the mountain with his personal salary. His energetic governance was met with the people's approval and he became one of the few local officials to earn the praise of Zhu Wan, the grand coordinator of Zhejiang. In 1548, Hu's likeness was carved into the cliff of Mt. Shenggui in his honour.
 Hu Zongxian was summoned to the capital Beijing in 1548 to take a position under the Censorate. In the six years as an investigating censor, Hu Zongxian distinguished himself by not only writing memorials to the throne evaluating the performance of provincial officials, but also participating in the actual administration of the provinces. During his tour of the Northern Metropolitan Region (Beizhili) from 1549 to 1551, Altan Khan broke through the defences at Gubeikou and pillaged the suburbs of Beijing. The defences of Xuanfu, where Hu Zongxian was stationed during the crisis, held fast, and Hu was able to send troops to relieve Beijing. He was rewarded for this and the emperor began to take note of his abilities.
 In the summer of 1551, Hu was transferred to Wuchang in the province of Huguang, where he participated in the suppression of a Miao rebellion on the provincial border with Guizhou. There, he gained firsthand knowledge of the Miao's fighting qualities, such that he called for their service during the pirate suppression campaigns a few years later. He was recalled to serve in the Censorate headquarters in Beijing in 1552. He made lasting connections with the political elite there: the most important of which was that of Zhao Wenhua, and by extension, that of Zhao's patron, the Senior Grand Secretary Yan Song, the official closest to the emperor.
 At this time the southeastern coast was under attack by the pirates known as the "wokou", who were a mix of Chinese merchants and foreign elements from Japan and Portugal violating the maritime prohibition laws. Hu Zongxian and Zhao Wenhua recommended a series of measures to counter this threat, including the expansion of the powers given to the grand coordinator, a position roughly equivalent to a provincial governor, so he could complete his task more freely. As a result of these suggestions, a new supreme commander position was created above the grand coordinators, overseeing the coastal provinces from Shandong to Guangdong. The Nanjing Minister of War Zhang Jing was assigned to this position in June 1554, and a few months later, Zhao Wenhua and Hu Zongxian were sent south to scrutinize his actions.
 For over six months, Hu Zongxian could write nothing but reports of military failures and the serious loss of life fighting against the pirates, citing the government troops' poor discipline and leadership. Zhang Jing himself refused to cooperate with Zhao Wenhua, and Zhao Wenhua put his displeasure into writing by accusing Zhang Jing in a memorial of deliberately delaying the operation for his own profit. However, soon after Zhao Wenhua sent out the memorial, Zhang Jing defeated the pirates at the Battle of Wangjiangjing (王江涇) on May 10, 1555, taking 1900 heads in what became the greatest Ming victory so far in the anti-wokou campaign. As it was too late to recant his earlier statement, Zhao Wenhua wrote another memorial to the throne downplaying Zhang Jing's victory while emphasizing Hu Zongxian's role leading up to Wangjiangjing, such as his ruse of placing poisoned shipments of wine on the pirates' path which killed up to 800 of their number. Zhao Wenhua also claimed that Hu Zongxian was present at the scene of battle in a suit of armour, even though he was actually at Hangzhou at the time. Hu Zongxian nevertheless went along with Zhao Wenhua and denounced Zhang Jing as well, adding that he had become arrogant after the victory. In the imperial court, Yan Song convinced the emperor that the victory proved that Zhang Jing had the capability to defeat the pirates and Zhao Wenhua was correct in his accusation that Zhang had been holding back, only striking when he heard about Zhao Wenhua's accusation against him. Infuriated, the emperor ordered Zhang Jing's arrest on June 5 and had him executed on November 12.
 Zhang Jing's replacement, Zhou Chong (周珫), had his powers greatly limited compared to his predecessor. Instead of the 6 coastal provinces under Zhang Jing's command, Zhou Chong's was limited to only the Southern Metropolitan Region, Zhejiang, and Fujian. Hu Zongxian was meanwhile promoted to Grand Coordinator of Zhejiang, and was soon promoted even higher to supreme commander in April 1556, after Zhou Chong and his successor Yang Yi (楊宜) were cashiered after less than a year in service due to their underwhelming performance.
 Compared to the short appointments of his predecessors, Hu Zongxian remained in power until 1563. His longevity as supreme commander, and indeed his meteoric rise, were due in part to his association with Zhao Wenhua's clique. Zhao Wenhua was opposed to a strict enforcement of the maritime prohibitions like the ones carried out by Zhu Wan, and instead favoured opening trade as the means to solve the wokou problem. Hu Zongxian, in turn, carried out a policy of appeasement despite his subordinates' disapproval and the emperor's orders to capture the pirate lord Wang Zhi dead or alive.
 Even before he had become supreme commander, Hu Zongxian sent envoys to Japan in his capacity as grand coordinator, ostensibly to request assistance from Japanese authorities, but, in fact, to establish contact with Wang Zhi to entice him to surrender. Drawn by the prospect of legal trade, Wang Zhi agreed to clean the shores of Zhejiang of pirates in return for a pardon. Wang Zhi also warned Hu that one of the pirate leaders in his consortium, Xu Hai, was on his way to raid Zhejiang again and Wang was not able to stop him in time. This was alarming news to Hu as it severely disrupted his plans of appeasement.
 To deal with the wokou threat, Hu assembled his own mufu, or private secretariat, enlisting the prominent figures of the region using his own connections since he was a native of the area. In this way, he attracted talents such as the writer Mao Kun (茅坤), the artist Xu Wei, the ink maker Luo Longwen (羅龍文), and the cartographer Zheng Ruoceng (鄭若曾), who helped to advise him in diplomacy and strategy.
 When Xu Hai came ashore and laid siege to the cities of Zhejiang along with his fellow Satsuma pirates Chen Dong (陳東) and Ye Ma (葉麻), Hu Zongxian and his mufu decided that they did not have the adequate numbers to decisively defeat the invaders, since the main Ming armies were in the northern frontier and Miao reinforcements were forthcoming. Instead, they manipulated Xu Hai with a generous offer of surrender. Throughout the course of the campaign, Hu Zongxian kept friendly contacts with Xu Hai, slowly turning him from his pirate allies by the use of bribes, deceptive promises of official status, and ships to sail back to Japan, and false warnings of mutiny among Xu's ranks. He also made use of existing interpersonal feuds among Xu Hai, Chen Dong, and Ye Ma by sending Xu's mistress trinkets so she would badmouth Chen Dong and Ye Ma in front of Xu Hai. Xu Hai eventually turned both Chen and Ye in to the authorities, and Hu made further use of them by making them write letters to their followers explaining that Xu Hai was going to betray and kill them. Hu Zongxian handed Xu Hai a copy of the letters, making Xu Hai grateful and thinking that Hu Zongxian had his interests in mind. When Chen and Ye's former followers received the letters, they rose up against Xu Hai at the Shen Family Estate (沈家莊) in Pinghu. At this point, Hu Zongxian's government forces, including newly-arrived Miao troops, entered the fray and killed indiscriminately. On September 29, the battle ended with up to 1600 marauders killed in the estate, and Xu Hai's body was found in a nearby stream. On October 10, Chen Dong, Ye Ma, and Xu Hai's brother were all executed in Jiaxing.
 With Xu Hai's group put down, Hu Zongxian was given the post of grand coordinator of Zhejiang in February 1557, concurrent with his supreme commander position, but it was Zhao Wenhua who took much of the credit and rewards for the victory. However, in September 1557, Zhao Wenhua was accused of embezzlement, lost imperial favour, and died a commoner. Hu now had to cultivate direct relations with Yan Song, and he did so by introducing Luo Longwen, a dealer and connoisseur in antiques and other luxury goods, to Yan Song's son Yan Shifan (嚴世蕃).
 Hu Zongxian turned his attention to Wang Zhi. On October 17, 1557, Wang Zhi arrived at Zhoushan Island with a large trading fleet. There he laid down his terms for surrender: he sought an imperial pardon, a naval commission, and that ports be open for trade. In return, he offered to patrol the coast and persuade the raiders to return to the islands through force if necessary. Hu Zongxian now faced a dilemma: he could not let Wang Zhi go, but if he accepted Wang Zhi's surrender, he might be forced to execute him (Zhao Wenhua's downfall made his policy of opening trade a political taboo), turning appeasement efforts to naught. Instead of dirtying his own hands, Hu Zongxian told Wang Zhi to present his petition to the investigating censor Wang Bengu (王本固), a political hardliner, in Hangzhou.
 In December, confident in his prospects and his invulnerability, Wang Zhi made landing at Hangzhou. There he was accorded respectable treatment by the authorities, who feared antagonizing his followers, while they figured out what to do with him. During this time, Hu Zongxian asked Wang Zhi to help manufacture arquebuses for the Ming army, which led to the weapon being widely used in China. Finally, in February of the next year, Wang Zhi was sent to prison, where he was given the luxuries of novelties, books, and healthy foods. Wang Zhi believed this was a temporary arrangement and remained hopeful for a pardon until January 22, 1560, when an imperial edict handed down the death sentence, and he was summarily beheaded.
 As pacification-minded officials like Hu Zongxian had feared, Wang Zhi's followers gave up hope for peaceful trade and went back to their violent ways. Feeling betrayed after Wang Zhi's arrest, Wang Zhi's godson Mao Haifeng made Zhoushan Island his base and launched raids on Zhejiang and Fujian. Hu Zongxian made a concerted effort to dislodge Mao from Zhoushan in March 1558, converging on the island from six directions with the generals Yu Dayou and Qi Jiguang, but failed and was forced to retreat. He tempered the rising criticism against him by blaming Yu and Qi, while sending Beijing a white deer, an auspicious Taoist symbol, to the emperor's great delight. The pirates eventually abandoned Zhoushan in December of the same year, owing to the heavy military presence there, and scattered south to Fujian, which became their new area of operation. In the summer of 1559, the remaining pirate bands in the Yangtze River Delta were wiped out. For his efforts, Hu was given the rank of Minister of War in June 1560 and the prestigious title of Junior Guardian (少保) in October 1561. His supreme commandership was also extended to include Jiangxi province since bandits were infesting the area, which lasted until November 1562. Shrines were erected in Hangzhou and his home district in his honour.
 Hu Zongxian had now reached the zenith of his career. In June 1562, his ally Yan Song fell out of imperial favour and finally lost his position as Senior Grand Secretary. In the following purge of Yan's associates, Hu Zongxian was impeached for being too friendly to Wang Zhi and mishandling military funds, among other perceived transgressions. An order for Hu Zongxian's arrest was made, and he arrived at the capital on January 19, 1563. The Jiajing Emperor, remembering Hu's substantial service and his auspicious gifts, interceded on his behalf and refuted claims that Hu Zongxian was part of Yan Song's clique, commenting that the recent attacks on Hu Zongxian were partisan. Hu was released and allowed to retire with all his titles intact, but his supreme commander position overseeing three provinces was considered too powerful, especially since the wokou had moved away from the crucial Jiangnan region, so the position was abolished after Hu Zongxian left office. Grand coordinators became the paramount figure in those provinces again.
 In April 1565, Yan Song's son Yan Shifan was executed, along with Luo Longwen, for treasonable offenses. Luo Longwen's estate was confiscated, and a search therein turned up a letter from Hu Zongxian asking Luo to present a bribe to Yan Shifan. Adding to this evidence of corruption, Hu Zongxian was also accused of providing shelter to Luo Longwen's son to help him escape the authorities. Hu Zongxian was thus brought from his home county of Jixi to Beijing to face trial in November 1565. While in prison, Hu submitted a memorial asking for clemency due to his past service, but it was soon discovered that Hu had died, supposedly from suicide by poison. The emperor ordered the case be closed after Hu's death.
 When Hu Zongxian's son tried to transport his father's body back to their home village, the local populace sixty miles north of Jixi threatened the entourage, forcing the son to leave the coffin on the roadside. Due to the interference of officials sympathetic to Hu Zongxian, the coffin was moved to a temple and later transferred back to Jixi for interment. Despite the people's hostility at the time of his death, Hu Zongxian's name was rehabilitated over the following decades. In 1569, the people of Hangzhou built a new shrine in his memory, and his original titles and ranks were restored posthumously by imperial order in 1572. In 1589, on the appeal of Hu's grandson, Hu's achievements were recounted and he was accorded a state reburial. During the Japanese invasions of Korea (1592–98), Hu Zongxian's victory against the wokou was given new currency, and he was canonized with the posthumous name Xiangmao (襄懋), meaning "splendid assistance".
 Hu Zongxian is featured in the Vietnamese epic poem The Tale of Kieu. In the epic, his campaign against Xu Hai was fictionalised and he was portrayed in a more negative light than in Chinese historical canon.