The United States needed to connect the Atlantic and Pacific Oceans after gaining territory in the Philippines and Guam from the Spanish-American War. Building a canal through the isthmus of Panama was the easiest route, but Colombia controlled the area. The U.S. offered Colombia money to build the canal, but Colombia declined. A revolution then occurred in Panama, and the U.S. recognized the new nation of Panama. Panama then signed a treaty granting the U.S. control over the canal zone to build the canal, which opened in 1914.