The U.S. military was involved in Korea before the founding of the ROK itself, and was instrumental in shaping the early ROK government. After the Pacific War against Japan, the United States took control over the southern half of the Korean peninsula and established the United States Army Military Government (USMGIK). The Korean peninsula was divided at the 38th parallel as a result of a deal between the United States and the Soviet Union, with the Soviet Union maintaining influence on the northern part of the Peninsula through the creation of the Democratic People’s Republic of Korea and support for the first DPRK leader, Kim Il Sung. The USMGIK, which controlled Korea from the end of WWII until 1948, did not consist of Korean specialists, but American personnel who were located in nearby Japan at the end of the Pacific War. Lt. General John R. Hodge, the head of USMGIK, relied on Japanese reports about Korea to learn about the country, and arrived in Korea already biased against the population.
Before the USMGIK arrived, a group of Koreans, called the Korean People’s Republic, had already established a basic government structure, and had popular support. Hodge was distrustful of Koreans in general, and in specific anything that resembled leftism. Instead of working with the Korean People’s Republic, Hodge initially relied on former Japanese colonial officials, letting some of them remain in power. When the USMGIK realized how unpopular the Japanese officials were, it instead strongly supported right wing Korean factions, and allowed these factions to flagrantly violate the civil rights of any Korean who was suspected to have links to their more left wing opponents. The good will the US military had earned through defeating the Japanese was squandered by the USMGIK, and during its time in power there were many large demonstrations against its policies.
On August 15, 1948, Syngman Rhee was elected the first president of the newly founded Republic of Korea. After the founding of the new republic, all of the U.S. military members left Korea by 1949. The absence of U.S. forces in South Korea created a power vacuum that the militarily more powerful DPRK took advantage in 1950. Rather than allow communist North Korea conquer their former protectorate, the United States intervened. After the Korean War, the United States and the ROK formalized their alliance by signing of the October 1, 1953 Mutual Defense Treaty. In the treaty, the United States committed to protect the ROK from external attack, and the ROK consented to allow U.S. forces in its territory based on mutual agreement between the two parties. The treaty remains in place, and is the beginning and the foundation of the U.S.-ROK alliance.