How did Texas get the nickname 'The Lone Star State'?

A single star was part of the Long Expedition (1819), Austin Colony (1821) and several flags of the early Republic of Texas. Some say that the star represented the wish of many Texans to achieve statehood in the United States. Others say it originally represented Texas as the lone state of Mexico which was attempting to uphold its rights under the Mexican Constitution of 1824. At least one "lone star" flag was flown during the Battle of Concepcion and the Siege of Bexar (1835). Joanna Troutman's flag with a single blue star was raised over Velasco on January 8, 1836. Another flag with a single star was raised at the Alamo (1836) according to a journal entry by David Crockett. One carried by General Sam Houston's Texans army (which defeated Mexican General Santa Anna at the Battle of San Jacinto ) may have been captured and taken to Mexico. Another "lone star" flag, similar to the current one but with the red stripe above the white, was also captured the following year (1837) and returned to Mexico. The "David G. Burnet" flag, of "an azure ground" (blue background) "with a large golden star central" was adopted by the Congress of the Republic of Texas in December of 1836. It continued in use as a battle flag after being superseded in January of 1839. The 1839 design has been used to symbolize the Republic and the "Lone Star State" ever since.