The secession of Panama from Colombia was formalized on 3 November 1903, with the establishment of the Republic of Panama and the abolition of the Colombia-Costa Rica border. From the Independence of Panama from Spain in 1821, Panama had simultaneously declared independence from Spain and joined itself to the confederation of Gran Colombia through the Independence Act of Panama. Panama was always tenuously connected to the rest of the country to the south, owing to its remoteness from the government in Bogotá and lack of a practical overland connection to the rest of Gran Colombia. In 1840–41, a short-lived independent republic was established under Tomás de Herrera. After rejoining Colombia following a 13-month independence, it remained a province which saw frequent rebellious flare-ups, notably the Panama crisis of 1885, which saw the intervention of the United States Navy, and a reaction by the Chilean Navy.
During the construction of the Panama Canal, the initial attempts by France to construct a sea-level canal across the isthmus were secured through treaty with Colombia; however French cost overruns led to abandonment of the canal for a decade. During the intervening years, local separatists used the political instability of the Thousand Days' War to agitate for political secession from Colombia and establishment of an independent republic. When the United States sought to take over the canal project, the legislature of Colombia rejected the proposed treaty. With the collaboration of French lobbyist Philippe-Jean Bunau-Varilla and United States President Theodore Roosevelt, Panama declared independence from Colombia and negotiated a treaty granting the U.S. the right to construct the canal.