The earliest contact between both countries was through merchants and explorers. Later in the mid-1800's several representatives from the U.S. traveled to Japan in order to negotiate trade agreements, including Commodore Matthew Perry in 1852 who negotiated the first trade treaty and the Convention of Kanagawa. Likewise a Japanese delegation came to the U.S. in 1860 in hopes of strengthening diplomatic and trade relations between both countries.
World War II:
World War II saw the countries pitted against each other after the Japanese bombed the American naval base atPearl Harbor, Hawaii, in 1941. The war ended in 1945 after Japan suffered tremendous causalities from the atomic bombing of Hiroshima and Nagasaki and the firebombing of Tokyo.
Both China and the US got involved in the Korean War in support of the North and the South respectively. This was the only time when soldiers from both countries actually fought as the U.S./U.N. forces battled Chinese soldiers upon China's official entrance in the war to counter American involvement.
On August 14, 1945 Japan surrendered leading to occupation by the victorious Allied forces. Upon gaining control of Japan, U.S. president Harry Truman appointed General Douglas MacArthur as Supreme Commander of the Allied Powers in Japan. The Allied forces worked on the reconstruction of Japan, as well as consolidating political legitimacy by publicly standing on the side of Emperor Hirohito. This allowed MacArthur to work within the political system. By the end of 1945, approximately 350,000 U.S. servicemen were in Japan working on wide variety of projects.
Post War Transformation:
Under Allied control, Japan undertook a remarkable transformation characterized by the new constitution of Japan which emphasized democratic principles, educational and economic reform, and demilitarization which was embedded in the new Japanese constitution. As the reforms took place MacArthur gradually shifted political control over to the Japanese culminating in the 1952 Treaty of San Francisco which officially ended the occupation. This framework was the beginning of a close relationship between both countries that lasts until this day.
The period after the San Francisco treaty has been characterized by close cooperation between both countries, with 47,000 US military servicemen remaining in Japan by invitation of the Japanese government. Economic cooperation has also been played a large role in the relationship with the US providing Japan with significant amounts of aid in the post-war periods as Japan became an ally in the Cold War. The partnership has resulted in the reemergence of the Japanese economy which remains one of the strongest economies in the region.