The United States began asserting itself overseas in the late 1800s. It purchased Alaska from Russia in 1867 and annexed Hawaii in 1898. The US sought to increase trade with Japan and China but faced competition from European powers. In 1898, the Spanish-American War resulted in the US gaining control of Puerto Rico, Guam, and the Philippines. The US then took on the role of promoting stability and protecting its economic interests in Latin America through policies like the Roosevelt Corollary and dollar diplomacy. A key part of increasing American influence was the building of the Panama Canal in the early 1900s.