On November 13, 1903, the United States formally recognized the Republic of Panama (after recognizing it unofficially on November 6 and 7). On November 18, 1903, the United States Secretary of State John Hay and Philippe-Jean Bunau-Varilla signed the Hay–Bunau-Varilla Treaty. No Panamanians signed the treaty, although Bunau-Varilla was present as the diplomatic representative of Panama (a role he had purchased through financial assistance to the rebels), even though he had not lived in Panama for seventeen years prior to independence, and never returned afterwards. The treaty was later approved by the Panamanian government and the Senate of the United States.