After Mexico gained independence from Spain, it legalized immigration from the United States. Empresarios were granted contracts to settle immigrants from the United States and Europe in Mexican Texas. As the number of Americans living in Texas increased, Mexican authorities began to fear the United States would want to annex Texas. On April 6, 1830, the Mexican government passed a series of laws restricting immigration from the United States into Texas. The laws also canceled all unfilled empresario contracts and established customs houses in Texas to enforce the collection of customs duties. Mexican military officer Juan Davis Bradburn, formerly an American citizen, was appointed commander of a new customs and garrison post on Galveston Bay. In October 1830 Bradburn established a post atop a bluff at the entrance to the Trinity River. The post became known as Anahuac.