Chinese–U.S. relations refers to international relations between of America and the People's Republic of China Most analysts characterize present Chinese-American relations as being complex and multifaceted. The United States and China are usually neither allies nor enemies; the U.S. government does not regard China as an adversary but as a competitor in some areas and a partner in others.[citation needed] The Qing Dynasty opened the first modern official diplomatic relations in late 19th century, After Xinhai revolution, newly formed Republic of China maintained diplomatic ties with the USA. During the Second World War, China was a close ally of the United States. At the founding of the communist-ruled People's Republic of China in 1949, the USA did not immediately recognize the newly established government of China. Until January 1979, the United States recognized the Republic of China on Taiwan as the legitimate government of China, and did not maintain diplomatic relations with the People's Republic of China on the mainland. In the midst of the Cold War, the Sino-Soviet split provided an opening for the US to establish ties with mainland China and use it as a counter to the Soviet Union and its influence. It was after January 1979 that the USA government switched recognition from Taipei to Beijing, as well as the diplomatic relations.