The Republic of Texas successfully seceded from Mexico in 1836 (this, however took the form of outright rebellion against Mexico, and claimed no warrant under the Mexican Constitution to do so). Mexico refused to recognize its revolted province as an independent country, but the major nations of the world did recognize it. In 1845, Congress admitted Texas as a state. The documents governing Texas' accession to the United States of America do not mention any right of secession—although they did raise the possibility of dividing Texas into multiple states inside the Union. Mexico warned that annexation meant war and the Mexican–American War followed in 1846.