In the spring of 1777, Nguyen Nhac sent Nguyen Hue to Saigon with a large seaborne expedition. In a six-month campaign, Nguyen Hue defeated all the Nguyen Phuc armies, including those of Mac Thien Tu and reinforcements from Phu Yen. Nguyen Phuc Thuan, Nguyen Phuc Duong, and most of the Nguyen Phuc princes were captured and killed, as was Ly Tai. Mac Thien Tu fled to Siam. Nguyen Phuc Anh escaped through many vicissitudes to the island of Tho Chu, 150 kilometers into the sea west of the Ca Mau peninsula. For a short time he found refuge at a Christian seminary in Ha Tien directed by a French missionary named Pierre Pigneau (1741–1799, later known as Pigneau de Behaine and, in Vietnamese, Ba Da Loc). Pierre Pigneau spent the rest of his life devoted to Nguyen Phuc Anh’s cause. Shortly after Nguyen Hue had returned to Qui Nhon in the autumn of 1777, Nguyen Phuc Anh rallied men in Gia Dinh loyal to his family. By the end of the year, with the assistance of Do Thanh Nhan and others, he had retaken Saigon. During the first half of 1778, Nguyen Phuc Anh repulsed all Tay Son efforts to regain Saigon. During the second half of the year, he was busy building military bases and sea-going warships. In 1779, he established an administrative structure to govern the major population centers in the Mekong plain. In this year, he also intervened in Cambodia to establish a regime that was friendly to him. Outeireachea III had died in 1777. In 1778, Chei Chéttha V, as a Siamese vassal, had conscripted an army and sent it to join Taksin’s invasion of Laos. This provoked distress, unrest, and, finally, rebellion. In 1779, Nguyen Phuc Anh sent Do Thanh Nhan with an army to place Ang Eng, a 5-year-old son of Out- eireachea III, on the throne. Chei Chéttha V was killed, and a pro-Vietnamese nobleman named Mou was appointed to serve as regent for the young king. In 1780, Nguyen Phuc Anh, at the age of 18, proclaimed himself king at Saigon. His authority extended north into the province of Phu Yen and west to his vassal in Cambodia. In a domain of rivers and coasts, shipbuilding continued to be a priority, and a new design of two-level galleys began to be produced at Saigon, with rowers in the bottom level and soldiers on the upper level. Do Thanh Nhan invented innovative means of attacking in swampy terrain while pacifying Khmer resistance in Tra Vinh. Do Thanh Nhan’s successes and the trust that Nguyen Phuc Anh placed in him made him a target of jealousy, and it may have been that his popularity among the soldiers began to threaten Nguyen Phuc Anh’s sense of security. Whether with reason or not, in spring of 1781 Do Thanh Nhan was accused of disloyalty and killed. A subsequent uprising led by men loyal to him was put down with hard fighting. Shortly after, Nguyen Phuc Anh sent a large army north to join the battles in Phu Yen. With it went some eighty war boats, two of them of European design. This was the high point of Nguyen Phuc Anh’s fortunes before many years of tribulation and exile. Since proclaiming himself king in 1776, Nguyen Nhac had been frustrated in his efforts to destroy the Nguyen Phuc. He was not able to concentrate his attention on his southern enemy because he remained uncertain about his north- ern enemy, with whom he maintained an uneasy truce. During these years, his base of power was in the three provinces of Binh Dinh, Quang Ngai, and Quang Nam. His southern border in Phu Yen was in perpetual contestation, while the border between Quang Nam and Thuan Hoa needed constant vigilance, for the Trinh frequently sent raids into Quang Nam to test Tay Son readiness and to collect rice. This situation began to change in 1781 and 1782 as a result of events related to the failing health and death of Trinh Sam. In the late 1770s and early 1780s, there was a series of droughts and nearly constant famine conditions in the north. Taxes were regularly excused due to rural hunger. Meanwhile the same old agrarian problems continued to appear with corruption drying up tax revenue and unsuccessful efforts to repopulate abandoned fields. In 1776, the taxes of over half of all registered fields were assigned to officials in lieu of salaries. Officials wanted to change salaries from fields to cash, but cash was unavailable. In this year, the government appears to have given up on any effort to even think about village conditions. The require- ment that provincial officials make an annual report on the welfare of the common people was discontinued with the argument that it was a troublesome procedure that wasted time and produced no results. Yet, in 1779, as famine conditions became difficult to ignore, an edict went out for officials to investigate the living conditions of the people, but there is no indication of any result. Northerners had learned to live with misgovernment. Despite his inability to address real problems, Trinh Sam could not shake away his desire to be king. In 1777 he sent an envoy to Qing reporting that the Le dynasty was extinct and requesting recognition of himself as king. The envoy was so disturbed by his mission that after departing he burned his documents and took poison. In these years, Ngo Thi Si and especially Le Quy Don pandered to Trinh Sam’s whims. Le Quy Don and his disreputable son became notorious for corruption. The son was briefly imprisoned in 1775 when he was caught cheating in the capital examination. In 1776, Le Quy Don spent several months in Thuan Hoa, assigned to inspect and report on conditions there. In 1777 he was sent to inspect the tax registers in Thanh Hoa. In 1778, Trinh Sam ignored public denunciations of Le Quy Don and his son for corruption. In 1779, Le Quy Don suffered a brief embarrassment when his corrupt dealings with an upland chieftain in the northern mountains provoked an uprising. The fact was that an important source of wealth for Trinh Sam was from corrupt officials like Le Quy Don. In 1780, Trinh Sam demoted his eldest son Trinh Khai and instead named as his heir Trinh Cau, a sickly infant son of his favorite concubine. Trinh Cau’s mother was closely allied with the family of Hoang Ngu Phuc, the famous, now deceased, general. There were rumors that Hoang Ngu Phuc’s grandson, Hoang Dinh Bao, was her lover and that he planned to murder the child and seize power for himself. Nguyen Khai was imprisoned when he was discovered to be in a plot against Hoang Dinh Bao. Le Quy Don and members of his clique were busy on behalf of Hoang Dinh Bao. For two years, this situation drifted along with both Trinh Sam and Trinh Cau incapacitated by illness. When Trinh Sam died in autumn of 1782, the Thanh Hoa and Nghe An soldiers stationed in Ke Cho killed Hoang Dinh Bao, discarded Trinh Cau, and released Trinh Khai from prison, making him lord of the palace. When the élite prisons were opened to release Trinh Khai, three grandsons of the king were also released. They had been imprisoned in 1769 along with their father, former crown prince Le Duy Vi, Trinh Sam’s childhood nemesis. Le Duy Vi had been replaced as crown prince by a younger brother, and then killed two years later. In early 1783, the soldiers raised the eldest of Le Duy Vi’s sons, 18-year-old Le Duy Khiem, to be the crown prince, deposing a younger brother of Le Duy Vi who had been selected by Trinh Sam. One member of the Hoang Dinh Bao faction was Nguyen Huu Chinh, a protégé of Hoang Ngu Phuc who was then in command of Nghe An Province. With his enemies gaining power at Ke Cho, he was in a vulnerable position, so he decided to flee south and join Nguyen Nhac. He had been Hoang Ngu Phuc’s envoy to Nguyen Nhac in 1775 and the two men reportedly had gotten along well on that occasion. He now advised Nguyen Nhac that it would be a propi- tious time to take Thuan Hoa. Meanwhile, at Ke Cho, the Thanh Hoa and Nghe An soldiers, having tasted power, began to dominate and terrorize public life with riots and homicides. In 1784, Trinh Khai made a secret plan to raise soldiers from the Red River plain to pacify the Thanh Hoa and Nghe An men, but he was stymied when word of it leaked out. Efforts to placate the soldiers failed. They established a regime of pillaging that began to replace any semblance of normal government. In 1785, Bui Huy Bich (1744–1802), a graduate of 1769 from the capital, tried to encourage greater soberness among the arrogant soldiers by giving more visibil- ity to the king, Le Duy Dieu. He did this by making large events of the public sessions of the royal court on the first and fifteenth days of the lunar month, which Le Quy Don, on behalf of Trinh Sam, had sabotaged more than a decade earlier. But the theater of ritual was no substitute for military discipline. The Trinh reliance upon the soldiers from Thanh Hoa and Nghe An, which for generations had been the source of Trinh strength, had now become the source of Trinh weakness. Leadership at Ke Cho was at an impasse, and a foe was now gathering new strength in the south.