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?

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. <SEP> In 1642, the 5th Dalai Lama (1617–1682) became the first to wield effective political control over Tibet. 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. <SEP> 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." <SEP> qing dynasty rule in tibet began with their 1720 expedition to the country when they expelled the invading dzungars. amdo came under qing control in 1724, and eastern kham was incorporated into neighbouring chinese provinces in 1728. meanwhile, the qing government sent resident commissioners called ambans to lhasa. in 1750 the ambans and the majority of the han chinese and manchus living in lhasa were killed in a riot, and qing troops arrived quickly and suppressed the rebels in the next year. like the preceding yuan dynasty, the manchus of the qing dynasty exerted military and administrative control of the region, while granting it a degree of political autonomy. the qing commander publicly executed a number of supporters of the rebels and, as in 1723 and 1728, made changes in the political structure and drew up a formal organization plan. the qing now restored the dalai lama as ruler, leading the governing council called kashag, but elevated the role of ambans to include more direct involvement in tibetan internal affairs. at the same time the qing took steps to counterbalance the power of the aristocracy by adding officials recruited from the clergy to key posts. <SEP> 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.