As president, Adams continued to pursue an agreement on territorial disputes with Britain, including the unsettled border between Maine and Canada. Gallatin favored partitioning Oregon Country at the Columbia River, but Adams and Clay were unwilling to concede territory below the 49th parallel north. Mexico gained its independence shortly after the United States and Spain ratified the Adams–Onís Treaty, and the Adams administration approached Mexico about a renegotiation of the Mexico–United States border. Joel Roberts Poinsett, the ambassador to Mexico, unsuccessfully attempted to purchase Texas. In 1826, American settlers in Texas launched the Fredonian Rebellion, but Adams prevented the United States from becoming directly involved.