The first contact between Nepal and China appears to have occurred in the mid-7th century. The contacts between China and Nepal were opened once again during the Ming dynasty. In 1966, China and Nepal signed an Agreement on Trade, Intercourse, and Related Questions between the Tibet Autonomous Region (TAR) of China and Nepal allowing the citizens living in the border regions and religious pilgrims to cross the Tibet-Nepal border without a passport or visa. China was concerned about the political chaos in Nepal, due to armed uprising launched by Nepal Communist Party, which is openly Maoist. Relations with Tibet worsened with the rise of the Shah dynasty in Nepal. A series of agreements and a treaty followed the establishment of diplomatic relations between China and Nepal. China and Nepal's relations were strengthened after King Mahendra staged a coup in December 1960 in Nepal against the elected government headed by Prime Minister B. P. Koirala.