Question: When did the 5th Dalai Lama gain political control over the country that had a large number of contacts with the country pugs come from during Yuan?

full_context: Document 1: Sino-Tibetan relations during the Ming dynasty: Laird writes that Altan Khan abolished the native Mongol practices of shamanism and blood sacrifice, while the Mongol princes and subjects were coerced by Altan to convert to Gelug Buddhism—or face execution if they persisted in their shamanistic ways. Committed to their religious leader, Mongol princes began requesting the Dalai Lama to bestow titles on them, which demonstrated "the unique fusion of religious and political power" wielded by the Dalai Lama, as Laird writes. Kolmaš states that the spiritual and secular Mongol-Tibetan alliance of the 13th century was renewed by this alliance constructed by Altan Khan and Sönam Gyatso. Van Praag writes that this restored the original Mongol patronage of a Tibetan lama and "to this day, Mongolians are among the most devout followers of the Gelugpa and the Dalai Lama." Angela F. Howard writes that this unique relationship not only provided the Dalai Lama and Panchen Lama with religious and political authority in Tibet, but that Altan Khan gained "enormous power among the entire Mongol population."
Document 2: Dog fighting: Despite periodic dog - fight prosecutions, illegal canine pit battles continued after the Cruelty to Animals Act 1835 of England and Wales. Sporting journals of the 18th and 19th centuries depict the Black Country and London as the primary English dog fight centers of the period.
Document 3: Cavalier King Charles Spaniel: The Cavalier King Charles Spaniel is a small spaniel classed as a toy dog by The Kennel Club and the American Kennel Club. It originated in the United Kingdom and is one of the more popular breeds in many countries. Since 2000, it has grown in popularity in the United States and ranks as the 18th most popular pure - breed in the United States (2013 Registration Statistics). It has a silky, smooth coat and commonly a smooth undocked tail. The breed standard recognizes four colours: Blenheim (chestnut and white), Tricolor (black / white / tan), Black and Tan, and Ruby. The breed is generally friendly, affectionate and good with both children and other animals; however, they require a lot of human interaction. Since they are a family dog, it is recommended to not leave them alone for long periods at a time. The expected average lifespan of a Cavalier King Charles Spaniel is under ten years.
Document 4: History of New Zealand: From 1840 there was considerable European settlement, primarily from England and Wales, Scotland and Ireland; and to a lesser extent the United States, India, China, and various parts of continental Europe, including the province of Dalmatia in what is now Croatia, and Bohemia in what is now the Czech Republic. Already a majority of the population by 1859, the number of Pākehā settlers increased rapidly to reach over one million by 1916.
Document 5: Pug: Pugs were brought from China to Europe in the sixteenth century and were popularized in Western Europe by the House of Orange of the Netherlands, and the House of Stuart. In the United Kingdom, in the nineteenth century, Queen Victoria developed a passion for pugs which she passed on to other members of the Royal family.
Document 6: Tibet: The 5th Dalai Lama is known for unifying the Tibetan heartland under the control of the Gelug school of Tibetan Buddhism, after defeating the rival Kagyu and Jonang sects and the secular ruler, the Tsangpa prince, in a prolonged civil war. His efforts were successful in part because of aid from Güshi Khan, the Oirat leader of the Khoshut Khanate. With Güshi Khan as a largely uninvolved overlord, the 5th Dalai Lama and his intimates established a civil administration which is referred to by historians as the Lhasa state. This Tibetan regime or government is also referred to as the Ganden Phodrang.
Document 7: Cavalier King Charles Spaniel: The Cavalier King Charles Spaniel is a small spaniel classed as a toy dog by The Kennel Club and the American Kennel Club. It originated in the United Kingdom and is one of the more popular breeds in many countries. Since 2000, it has grown in popularity in the United States and ranks as the 18th most popular pure - breed in the United States (2013 Registration Statistics). It has a silky, smooth coat and commonly a smooth undocked tail. The breed standard recognizes four colours: Blenheim (chestnut and white), Tricolour (black / white / tan), Black and Tan, and Ruby. The breed is generally friendly, affectionate and good with both children and other animals; however, they require a lot of human interaction. Since they are a family dog, it is recommended to not leave them alone for long periods at a time. The expected average lifespan of a Cavalier King Charles Spaniel is under ten years.
Document 8: Sino-Tibetan relations during the Ming dynasty: Wang and Nyima argue that the Ming emperor sent edicts to Tibet twice in the second year of the Ming dynasty, and demonstrated that he viewed Tibet as a significant region to pacify by urging various Tibetan tribes to submit to the authority of the Ming court. They note that at the same time, the Mongol Prince Punala, who had inherited his position as ruler of areas of Tibet, went to Nanjing in 1371 to pay tribute and show his allegiance to the Ming court, bringing with him the seal of authority issued by the Yuan court. They also state that since successors of lamas granted the title of "prince" had to travel to the Ming court to renew this title, and since lamas called themselves princes, the Ming court therefore had "full sovereignty over Tibet." They state that the Ming dynasty, by issuing imperial edicts to invite ex-Yuan officials to the court for official positions in the early years of its founding, won submission from ex-Yuan religious and administrative leaders in the Tibetan areas, and thereby incorporated Tibetan areas into the rule of the Ming court. Thus, they conclude, the Ming court won the power to rule Tibetan areas formerly under the rule of the Yuan dynasty.
Document 9: Sino-Tibetan relations during the Ming dynasty: The late Turrell V. Wylie, a former professor of the University of Washington, and Li Tieh-tseng argue that the reliability of the heavily censored History of Ming as a credible source on Sino-Tibetan relations is questionable, in the light of modern scholarship. Other historians also assert that these Ming titles were nominal and did not actually confer the authority that the earlier Yuan titles had. Van Praag writes that the "numerous economically motivated Tibetan missions to the Ming Court are referred to as 'tributary missions' in the Ming Shih." Van Praag writes that these "tributary missions" were simply prompted by China's need for horses from Tibet, since a viable horse market in Mongol lands was closed as a result of incessant conflict. Morris Rossabi also writes that "Tibet, which had extensive contacts with China during the Yuan, scarcely had diplomatic relations with the Ming."
Document 10: Sino-Tibetan relations during the Ming dynasty: Laird writes that the Ming appointed titles to eastern Tibetan princes, and that "these alliances with eastern Tibetan principalities are the evidence China now produces for its assertion that the Ming ruled Tibet," despite the fact that the Ming did not send an army to replace the Mongols after they left Tibet. Yiu Yung-chin states that the furthest western extent of the Ming dynasty's territory was Gansu, Sichuan, and Yunnan while "the Ming did not possess Tibet."
Document 11: Sino-Tibetan relations during the Ming dynasty: The Ming initiated sporadic armed intervention in Tibet during the 14th century, but did not garrison permanent troops there. At times the Tibetans also used armed resistance against Ming forays. The Wanli Emperor (r. 1572–1620) made attempts to reestablish Sino-Tibetan relations after the Mongol-Tibetan alliance initiated in 1578, which affected the foreign policy of the subsequent Qing dynasty (1644–1912) of China in their support for the Dalai Lama of the Gelug school. By the late 16th century, the Mongols were successful armed protectors of the Gelug Dalai Lama, after increasing their presence in the Amdo region. This culminated in Güshi Khan's (1582–1655) conquest of Tibet from 1637–1642 and the establishment of the Ganden Phodrang regime by the 5th Dalai Lama with his help.
Document 12: Sino-Tibetan relations during the Ming dynasty: Patricia Ebrey writes that Tibet, like Joseon Korea and other neighboring states to the Ming, settled for its tributary status while there were no troops or governors of Ming China stationed in its territory. Laird writes that "after the Mongol troops left Tibet, no Ming troops replaced them." Wang and Nyima state that, despite the fact that the Ming refrained from sending troops to subdue Tibet and refrained from garrisoning Ming troops there, these measures were unnecessary so long as the Ming court upheld close ties with Tibetan vassals and their forces. However, there were instances in the 14th century when the Hongwu Emperor did use military force to quell unrest in Tibet. John D. Langlois writes that there was unrest in Tibet and western Sichuan, which the Marquis Mu Ying (沐英) was commissioned to quell in November 1378 after he established a Taozhou garrison in Gansu. Langlois notes that by October 1379, Mu Ying had allegedly captured 30,000 Tibetan prisoners and 200,000 domesticated animals. Yet invasion went both ways; the Ming general Qu Neng, under the command of Lan Yu, was ordered to repel a Tibetan assault into Sichuan in 1390.
Document 13: Sino-Tibetan relations during the Ming dynasty: Dawa Norbu argues that modern Chinese Communist historians tend to be in favor of the view that the Ming simply reappointed old Yuan dynasty officials in Tibet and perpetuated their rule of Tibet in this manner. Norbu writes that, although this would have been true for the eastern Tibetan regions of Amdo and Kham's "tribute-cum-trade" relations with the Ming, it was untrue if applied to the western Tibetan regions of Ü-Tsang and Ngari. After the Phagmodrupa Changchub Gyaltsen, these were ruled by "three successive nationalistic regimes," which Norbu writes "Communist historians prefer to ignore."
Document 14: Sino-Tibetan relations during the Ming dynasty: Meanwhile, the Tumed Mongols began moving into the Kokonor region (modern Qinghai), raiding the Ming Chinese frontier and even as far as the suburbs of Beijing under Altan Khan (1507–1582). Klieger writes that Altan Khan's presence in the west effectively reduced Ming influence and contact with Tibet. After Altan Khan made peace with the Ming dynasty in 1571, he invited the third hierarch of the Gelug—Sönam Gyatso (1543–1588)—to meet him in Amdo (modern Qinghai) in 1578, where he accidentally bestowed him and his two predecessors with the title of Dalai Lama—"Ocean Teacher". The full title was "Dalai Lama Vajradhara", "Vajradhara" meaning "Holder of the Thunderbolt" in Sanskrit. Victoria Huckenpahler notes that Vajradhara is considered by Buddhists to be the primordial Buddha of limitless and all-pervasive beneficial qualities, a being that "represents the ultimate aspect of enlightenment." Goldstein writes that Sönam Gyatso also enhanced Altan Khan's standing by granting him the title "king of religion, majestic purity". Rawski writes that the Dalai Lama officially recognized Altan Khan as the "Protector of the Faith".
Document 15: Sino-Tibetan relations during the Ming dynasty: Rawski writes that Altan Khan's conversion to the Gelug "can be interpreted as an attempt to expand his authority in his conflict with his nominal superior, Tümen Khan." To further cement the Mongol-Tibetan alliance, the great-grandson of Altan Khan—the 4th Dalai Lama (1589–1616)—was made the fourth Dalai Lama. In 1642, the 5th Dalai Lama (1617–1682) became the first to wield effective political control over Tibet.
ground_truth: In 1642
sub_queries: Which was the country for Pug? Answer: China
Who had a large amount of contacts with China during Yuan? Answer: Tibet
When did the 5th Dalai Lama gain political control over Tibet ? Answer: In 1642