# Zhang Ni

Zhang Ni (190s - 254), courtesy name Boqi, rendered also as Zhang Yi, was a military general of the state of Shu Han during the Three Kingdoms period of China. Famous for his courage and generosity, Zhang Ni made his name known while rescuing a magistrate's wife from bandits and leading her to safety.
Zhang Ni often worked with Ma Zhong, another general of Shu Han, when pacifying the indigenous tribes residing within and around Shu's borders. He spent at least 18 years dealing with the continuum of domestic uprisings centered around the Yuexi/Yuesui and Ba commanderies. Though he was a talented general, Zhang Ni often looked for humane solutions and sought to make peace or negotiate with the tribes when he could. Thanks to his upright nature, the Sanguozhi recorded that the tribes loved him and even wept and grabbed hold of his carriage when they learned that he would be returning to Chengdu.
Feeling he was growing weak and old, Zhang Ni gave a stirring speech asking to give him a chance to repay his lord's largesse or die trying. Liu Shan was moved to tears by his speech. During Jiang Wei's seventh Northern Expedition, he was killed in battle against the Wei general Xu Zhi after forcing the enemy to retreat. His death was mourned such that none among the Han or foreign clan of Yuexi did not weep with grief, and a temple established for him was brought offerings even in times of famine and hardship.
Zhang Ni had the reputation of being one of the more successful later generals of the Shu Han state. Liu Shan, emperor of the Shu Han dynasty at the time of his service, compared him to the great heroes of antiquity, while Chen Shou in his appraisal of Zhang also referenced this comparison.

## Early life and career
### First feats and early fame

Zhang Ni was from Nanchong County (南充縣), Ba Commandery (巴郡), which is present-day Nanchong, Sichuan. Zhang Ni at a young age was orphaned and lived in poverty yet he already had a reputation of a strong and generous youth. He started his career as an Officer of Merit (功曹) at his local county office when he reached adulthood (around 19 years old). In 214, when the warlord Liu Bei seized control of Yi Province (covering present-day Sichuan and Chongqing) from its provincial governor Liu Zhang, some bandits used the opportunity to raid the county office. During the ensuing chaos, Zhang Ni engaged the bandits in close combat and protected the county magistrate's wife. He became famous for his courageous actions and was later summoned to the commander's office to serve as an Assistant Officer (從事).
While he served as Assistant Officer in Ba Commandery, two scholars, Gong Lu and Yao Zhou were appointed with greater rank and salary than him within the same commandery. At the time, they both enjoyed good reputation and fame however both of them had heard of Zhang Ni's accomplishments hence they respected and became friends with him.

### Quelling bandits and recovering

Around 227, when the Shu Han chancellor Zhuge Liang was assembling forces in Hanzhong Commandery in preparation for the first of a series of campaigns against Shu's rival state Wei, local bandits pillaged villages in the Hanzhong, Guanghan and Mianzhu commanderies. Zhang Ni, then holding the rank of an acting Commandant led his troops to deal with the bandits who scattered and hid in different locations when they heard of Zhang Ni's approach. Zhang Ni could not force them to come out to fight him so he pretended to offer to extend a heqin policy to the bandit chiefs and then managed to coax them into attending a banquet to celebrate the peace. After the unsuspecting bandit chiefs got drunk, Zhang Ni ordered his men to kill all of them and then sent his troops to hunt down and eliminate the rest. The massacre lasted for about 10 days, after which the area was clear of bandits.
After that, Zhang Ni fell seriously ill unfortunately his family was too poor to afford a good doctor and treatment. However, the Administrator of Guanghan (廣漢太守), He Zhi was known as a generous man and talented doctor so Zhang Ni thought that he should appeal to him. Since Zhang Ni and He Zhi did not know each other well and despite his illness, Zhang Ni personally took a carriage to visit He Zhi to entrust him with a treatment that could cure his illness. He Zhi knew of Zhang Ni's reputation as a brave and generous man so he did not spare any expense to cure him. Finally, after several years the illness was cured. Both of them remained friends after this event.

## As Officer of the Standard

When Zhang Ni recovered, he was promoted to Officer of the Standard (牙門將) for his feats against the different bandits and placed under Ma Zhong's command. In 232, they quickly quelled the rebelling Qiang tribes of Mount Wen (汶山) in the North who were allied with the state of Cao Wei while in the south they suppressed foreign tribes such as those led by Liu Zhou (劉胄). Zhang Ni often led the vanguard and had numerous feats in battle and in planning. Thus, Zhang Ni and Ma Zhong instilled much fear in the restless local tribes throughout Shu territories.

### Campaign against the Qiang tribes

During Zhang Ni and Ma Zhong's campaign against the Qiang tribes, Zhang Ni first led his own unit as the vanguard with only a few troops: about 300 men and horses. Separate from the main army, they were the first to arrive at the village of Tali. The location of the village was difficult to attack as it was atop a tall mountain. However, Zhang Ni climbed the mountains and set up his own camp four to five lǐ far from Tali (他里).
The Qiang knew there was danger and built a stone gate before the village. Atop the gate they set an elevated platform and gathered many stones atop it so that they could protect themselves while crushing their enemies. Zhang Ni judged that an assault on the gate would be complicated and so he sent an interpreter to inform them:
   "All of you, the tribes of Wen Mountain have rebelled and done harm to the innocents: hence Heaven's Son ordered us at once to quell and destroy the evil. However if you bow your heads and permit the army to pass giving provisions and supplies then you may enjoy good fortune and eternal prosperity and will be repaid a hundredfold. But if to the end, you do not obey then the great army will have no choice but to arrive and suppress you like a lightning bolt striking down and though then you may repent- It will be too late."
When the village's elders heard this command, they all quickly went out to meet with Zhang Ni and even provided provisions then let the army pass. Thus, the Shu Han army was victorious. When the rest of the Qiang tribes heard that Tali had already fallen, all of them were terrified and confused. Many among them welcomed the army and went out to surrender while others fled into the valleys. Ma Zhong and Zhang Ni hunted those who fled and achieved total victory.

### Slaying and defeat of Liu Zhou

In 233, the southern foreigner Liu Zhou led a massive revolt. Zhang Yi (Bogong) was unable to quell the revolt so Ma Zhong was appointed as Area Commander of Laixiang (庲降都督) with a mandate to defeat Liu Zhou along with Zhang Ni as vanguard. Since Zhang Ni was always at the forefront of the army, he beheaded Liu Zhou.
With Liu Zhou's death, most of the southern's tribes surrendered however in the Zangke (牂牁) and Xīnggu (興古) commanderies, the Liao (獠) tribes revolted again. So Ma Zhong sent Zhang Ni to command an army and quell the rebellions. Zhang Ni enticed most of them to surrender and quickly two thousand men joined him then were all transferred to Hanzhong's military command.

### Foreseeing of Fu Jian's accident

The territory of Wudu, situated on the border between Shu Han and Cao Wei was a largely autonomous territory belonging to Shu Han in name but largely led by the Di (氐) tribes inhabiting the area. At around 236, one of the Di tribes' most famous leaders Fu Jian (苻健) offered to submit to Shu Han so General-in-Chief Jiang Wan sent a general, Zhang Wei (張尉) to receive them. However, Zhang Wei took longer than Jiang Wan expected returning, so much so that Jiang started to worry. Zhang Ni was at Chengdu at this time and tried to appease Jiang Wan's worries by saying:
   "Fu Jian's request to join us was sincere and certainly his mind has not changed. However, it is common knowledge that Fu Jian's younger brother is sly and treacherous. Moreover, the foreign Di tribes have trouble working together, so there has likely been changes and unusual circumstances that have delayed Zhang Wei and forced him to remain longer to accomplish his task."
Several days later, news arrived of Zhang Wei's expedition proving that Zhang Ni's prediction was right. Fu Jian's younger brother had indeed led most of the tribes to join the state of Cao Wei while Fu Jian came to submit to Shu Han with Zhang Wei.

## Subjugation of indigenous tribes
### Restoring Han authority in Yuexi Commandery

Sometime in the 230s, the Sou (叟) tribes in Yuexi/Yuesui Commandery (越巂郡; around present-day Liangshan Prefecture, Sichuan) revolted and declared their independence. The commandery had belonged to Shu Han since the forceful subjugation of Gāo Dìng in 225 by Li Yan but the State had problems asserting its authority over it. The situation degenerated when the rebels killed the two administrators, Gong Lu and Jiao Huang (焦璜), sent by the Shu government to govern the commandery. Furthermore, due to the hostilities from the locals subsequent appointed administrators would not enter Yuexi Commandery to assume their offices but could only reside at Anshang (安上) county, eight hundred li away and could not assume office. As a result, the Shu government's claim over Yuexi Commandery was in name only.
There was discussion about restoring the commandery so the Shu government appointed Zhang Ni as the Administrator of Yuexi Commandery. When he arrived, Zhang Ni led those he commanded in Yuexi and enticed the tribes with favor and generous treatment hence the foreigners all started to return to submission. However, the northern region of Zhuomaa (捉馬) was the most rebellious. They were stalwart and strong and refused to submit to authority quickly, so Zhang Ni led his army to quell them. Zhang Ni captured their leader Wei Lang (魏狼) alive but released him as a show of mercy to win over the trust of his kind. Later, he memorialized the court to have Wei Lang be given a fief as a city Marquis and to have his tribe of three thousand households be officially recognized to pacify them. When the other tribes heard of this event, they gradually surrendered to Zhang Ni. For his feats, the Shu government rewarded Zhang Ni by granting him the title of secondary Marquis (關內侯).

### Conflict with the tribes of Suqiyi

The people of Suqiyi (蘇祁邑) were led by the chieftain Dong Feng (冬逢) and his younger brother Dong Qu (冬渠). Dong Qu and the Suqiyi had already surrendered but they rebelled while Zhang Ni was concentrating on matters in Zhuomaa. Zhang Ni quickly defeated them and put Dong Feng to death. However, Dong Feng's wife was the daughter of another tribal leader the ruler of the Maoniu tribe. In order to avoid further rebellion from them, Zhang Ni isolated them.
Dong Feng's brother Dong Qu used this time to flee to the western frontier. He rallied the remnant of the Suqiyi. Dong Qu was a fierce and strong warrior hence the Suqiyi deeply feared him. Qu sent two of his close relatives to feign surrender to Zhang Ni but in reality to obtain information. However Zhang Ni saw through this and with lavish gifts, he convinced them to defect then Zhang Ni had the two men sent to kill Qu. With the death of their rebel leader, all the tribes were secure. After this, Zhang Ni turned his attention to the Duqi (都耆) leader Li Qiucheng (李求承), who previously had personally killed the former Administrator Gong Lu. Zhang Ni raised an army to capture him with the result that Li Qiucheng was captured in battle. Zhang Ni then read a list of his crimes and executed him.

### Restoring infrastructure

Originally, because of the tribal raids most of Yuexi's commandery infrastructure were in ruins. Zhang Ni initiated a building project to have the city walls repaired in order to protect the people. Most of the work was done by foreign and local tribes: the Sanguozhi records that among the men and women, everyone worked their hardest to help Zhang Ni rebuild. Zhang Ni was in office for three years in Yuexi Commandery until he was repatriated to his former prefecture in Ba Commandery.

### Taking back the three counties

Dingzhuo (定莋), Taideng (台登) and Beishui (卑水) were three counties over three hundred lǐ away from the Yuexi's headquarters. These counties formed a large part of Yuexi's revenue since they produced valuable commodities like salt, iron, and lacquer but were on the western border and seized by foreign tribes for themselves. Zhang Ni led his army to seize control of the counties and to establish a Chief Clerk to oversee production.
However Dingzhuo county proved to be the most difficult to take over. The chieftain's leader, Hao Langcen (豪狼岑), the Panmu King's maternal uncle who was greatly trusted by the foreign tribes hated Zhang Ni for his incursion and would not go meet him. Rather than attack Dingzhuo, Zhang Ni decided to intimidate the tribes into surrendering. He sent several tens of strong warriors to go capture Hao Langcen, beat and kill him. Then, Zhang Ni sent the body back to the tribes along with generous rewards describing Hao Langcen's evil crimes and also saying:
   "Do not rush mindlessly into action. If you act, you will be exterminated!"
When they heard this, the foreign people all dirtied their faces and bound themselves to apologize for their crimes. To reward them, Zhang Ni killed an ox for a great feast and did not harm them. Hence, Zhang Ni reaffirmed his grace and trust among the tribes. And so, he regained control of Dingzhuo and the production of salt, iron and tools were all provided for.

### Conflict with the tribe leader Lang Lu

The Hanjia (漢嘉) County's border had Maoniu (旄牛) foreign tribes of over four thousand households while their leader Lang Lu (狼路) held a grudge against Zhang Ni since the deaths of Dong Feng and Dong Qu of the Suqiyi. Dong Feng's wife was the aunt of Lang Lu, the chief of the Maoniu tribe so they resented his death. Lang Lu sent his father's younger brother Lang Li (狼離) to take command of Dong Feng's remnants army and engage Zhang Ni in battle. Rather than face them, Zhang Ni observed the situation and in response sent one of his own relatives to Lang Li with presents such as oxen and wine as gifts of appreciation. Additionally, Lang Li's elder sister had been under Zhang Ni's care since her husband's execution (Dong Feng) so he sent her back to her family to show his good intentions. Lang Li received both the gifts and met his older sister. Both him and his sister were overjoyed to meet again so Lang Li led his followers to submit to Zhang Ni. Zhang Nì bestowed generous rewards upon Lang and treated him well and sent them back to the Maoniu who they then persuaded to submit entirely.

### Forming good relation with the foreign tribes

The commandery had an old road that led from Yuexi to Chengdu that was in good condition. But it went through Maoniu territory and since it had been cut off, it had not been used for over a century. Zhang Ni sent his attendants to Lang Lu as ambassadors along with generous gifts and also asked Lang Lu's paternal aunt to speak with Lang Lu as well. He offered friendship and expressed his desire to reopen the road. So Lang Lu led his brothers, wives and children to all go to Zhang Ni, swear an oath of alliance and commit to reopening the old road.
The result was that a thousand lǐ of pathways were cleared and the former relay stations restored allowing communication between Chengdu and the west. Zhang Ni memorialized the court to give a fief to Lang Lu as King of the Maoniugoupí (旄牛㽛毗) while Lang Lu sent an envoy to Chengdu to present his formal surrender to Shu. For this exemplary work in the west, Zhang Ni was made General Who Settles Military Affairs with authority over the commandery as before.

## Advising Fei Yi and Zhuge Ke
### Advice to Fei Yi

Zhang Ni observed that Fei Yi, General-in-Chief at the time, was unrestrained by nature and careless in showing favor. He also noted that Fei Yi was excessive in his trust and good treatment to newcomers. Zhang Ni thus sent a letter to admonish him that said: "In the past Cen Peng was a great commander wielding the Staff of Authority but was killed by an assassin. Now you, wise General, occupy a position of great power and importance and should reflect on past events. You should act less careless and be on guard."
Later, Fei Yi was indeed killed by a surrendered general from Cao Wei, Guo Xiu.

### Advice to Zhuge Ke

Eastern Wu's Grand Tutor, Zhuge Ke, began raising massive armies from Wu and attacking the state of Cao Wei from the year 252. The Palace Attendant Zhuge Zhan, an official serving the Shu Han state, was Chancellor Zhuge Liang's son and Zhuge Ke's younger cousin. Zhang Ni wrote Zhuge Zhan a letter that said:
   "The ruler of the East, Sun Quan, has just perished, and the new Emperor Sun Liang is truly young and weak. The Grand Tutor has received a heavy burden of trust, and how can that be considered easy? Because your kinsman has the talent of the Duke of Zhou, there must also be those [in his court] like Guan and Cai spreading rumors that he intends to usurp the throne, and when Huo Guang received his appointment there were high officials like Yan and Ge planning to resist and rebel, and he had to rely on the wisdom of Cheng and Zhao in order to avoid disaster.
   In the past, I always heard the Eastern Ruler never gave the authority to kill or bestow rewards or punishments to his subordinates, yet now because of his death he has entrusted all future affairs to the Grand Tutor; that is truly worrisome. The lands of Wu and Shu are vulnerable, and in the past this has been noted, yet the Grand Tutor has left the young ruler and walks instead to face the enemy in his stronghold. I fear that this is not a good plan for the long term. Though it is said that the eastern country is ordered and solemn, and that those with high positions and low positions are all harmonious, is not even one loss out of a hundred something the wise should consider? The past has led to now, and what happens now follows the past. If your honor does not go forward to give loyal advice to the Grand Tutor, who else is there to speak freely to him? [Tell him to] Withdraw the army and develop agriculture, handle affairs with virtue and kindness, and within several years, both East and West will develop together: then it will not be too late. I hope you will thoroughly consider this.
Indeed, Zhuge Ke would lose his influence in the Eastern Wu court because of his losses at the Battle of Hefei (253) and would subsequently have all his clan exterminated. Zhang Ni's foresight was as such and often right.

## Battle of Xiangwu and death
### Leaving for the capital

Zhang Ni remained Administrator of Yuexi for 15 years and under his care it became a peaceful region. Feeling that his mission was done, he repeatedly asked to return and so his request was finally granted. He was summoned back to Chengdu. According to the Sanguozhi, both people of Han Chinese descent and other ethnic tribes were all deeply attached to Zhang Ni and grabbed the wheels of his carriage, wept and sobbed as they learned of his departure.
When Zhang Ni passed through the Maoniu lands using the road that he and Lang Lu had repaired together, the tribe leader Lang Lu came forward to welcome him, carrying his child on his back. He followed Zhang Ni to the border of the Shu Han prefecture of Yuexi and sent an escort of 100 warriors to present tribute to Chengdu with him. Upon his arrival in Chengdu in the year 254, Zhang Ni was made General Who Defeats Bandits (蕩寇將軍) and was well received by his colleagues. He was known as generous and heroic so scholars everywhere greatly esteemed him; however he was criticized by some for being too lax in morals and lacking in courtesy.

### Meeting with Xiahou Ba

Zhang Ni met the General of Chariots and Cavalry Xiahou Ba, who said to him: "Though you and I are not acquainted yet, I confide my feelings to you as if we were old friends. You should understand this intention." Zhang Ni answered: "I do not yet know you and you do not yet know me. When great principles lead elsewhere, how can you speak of confiding feelings? Let us after three years speak again." A wise scholar took this as a praiseworthy anecdote of Zhang Ni's character.

### Pleading to let him join the army for Didao

That year, Li Jian (李簡) a county magistrate from Shu's rival state Cao Wei secretly contacted the Shu government and expressed his desire to defect to Shu. Liu Shan convened a meeting to discuss whether to accept Li Jian's defection. Many officials expressed worries that it might be a ruse but Zhang Ni believed that Li Jian was sincere and managed to convince Liu Shan to agree. Liu Shan then allowed the general Jiang Wei to launch a campaign against Wei with Li Jian acting as a spy for them in Wei territory. When the Shu army led by Jiang Wei arrived at Didao as Zhang accurately predicted Li Jian led his followers to join the Shu army and helped them gain control of Didao.
At the time, Zhang Ni suffered rheumatism illness from old age. When he arrived at the capital, it became severe and he needed a crutch so he could rise. When Jiang Wei set out, many within the army had thought that Zhang Ni should be sent back to Chengdu especially since they thought that due to his illness he could not keep up. Zhang Ni personally begged to unleash all that was left of his strength to reach the enemy. Facing them, he said to Liu Shan:
   "I, your servant served you enlightened sage and received excessive grace. Moreover, my body is ill and I am always afraid that one morning I shall fail you and fail to repay the honor I have received. The world under heaven disobeys your wishes and must be settled with military affairs. If Liang province is settled then I your servant will be your defense and guard the border. If victory cannot be won then I will sacrifice my body as recompense."
Liu Shan was so touched after hearing Zhang Ni that he shed tears and permitted him to go on the campaign.

### Battle of Xiangwu and death

However, the campaign went awry as the Shu army attacked Xiangwu County (襄武縣; southeast of present-day Longxi County, Gansu), where the Wei defenders led by Xu Zhi put up a fierce resistance. Zhang Ni fought at the vanguard alongside his men but lost his life in the process though those he killed and injured were also numerous. The Sanguozhi recorded that his death was mourned such that none among the Han or foreign clan of Yuexi did not weep with grief and a temple established for him was brought offerings even in times of famine and hardship.

## Family

In recognition of Zhang Ni's valiant actions on the battlefield, Liu Shan enfeoffed Zhang Ni's eldest son, Zhang Ying (張瑛) as the Marquis of Xi Village (西鄉侯). Zhang Ni's original marquis title was then inherited by his second son, Zhang Huxiong (張護雄). Zhang Ni's grandson Zhang Yi was an Inspector of Liangzhou during the Jin dynasty.

## Appraisal

Chen Shou, who wrote Zhang Ni's biography in the Records of the Three Kingdoms (Sanguozhi), appraised him as follows: "Zhang Ni was intrepid and had a good insight of the situation... Along with Huang Quan, Li Hui, Lü Kai, Ma Zhong, Wang Ping, It was thanks to their qualities that they were all well known through the empire and because they seized the opportunity given to them that they left strong legacies."
Chen Shou, also gives in the Yi Bu Qijiu Zhuan (虞翻別傳) the following appraisal of Zhang Ni:
   I have observed Zhang Ni's behavior, appearance and speech; it cannot frighten, but his tactical abilities are considerable, and his intensity is indeed enough to establish his authority. As a servant, he was loyal and devoted to integrity. He is of a clear and upright nature, and when he acts he always considers the law. Liu Shan deeply esteemed him and compared him to the heroic warriors of the ancient past, he was not so far!

## In Romance of the Three Kingdoms

In the 14th-century historical novel Romance of the Three Kingdoms, Zhang Ni was one of the more notable generals in Shu's later years. He participated in many of Zhuge Liang's campaigns and displayed a fiery passion for Zhuge Liang's endeavours. Due to this, he sometimes found himself over his head and in dangerous situations, nearly being killed by Wang Shuang at Chencang before being rescued by Liao Hua and Wang Ping; he was also led into a trap and captured by Lady Zhurong during the Southern Campaign. While on his deathbed, Zhuge Liang named Zhang Ni, along with Liao Hua, Ma Dai, Wang Ping and Zhang Yi, as the loyal generals of Shu who should be given greater responsibilities.
During Jiang Wei's Northern Expeditions, Zhang Ni often urged Jiang Wei to concentrate on internal affairs rather than attacking Wei. He forfeited his life in Chapter 111, while saving Jiang Wei from Chen Tai.