Galveston County was formally established under the Republic of Texas on May 15, 1838. The county was formed from territory taken from Harrisburg, Liberty, and Brazoria Counties, with governmental organization taking place in 1839. The island and city of Galveston was by far the most important population center. The city of Galveston was the republic's largest city and its center of commerce and culture. Port Bolivar on the Bolivar Peninsula was a port of secondary importance. Other development in the area was initially mostly ranching interests and small farming communities. Texas soon joined the United States, and Galveston's importance continued to grow as it came to dominate the worldwide cotton trade. As railroads between Galveston, Harrisburg, Houston, and other towns were built during the 19th century, small communities grew up along the rail lines. Nevertheless, Galveston continued to remain a prominent destination for the shipping and trade industries. A bridge was completed in 1859, when the Galveston, Houston, and Henderson Railroad built a wooden trestle that was used by all other railway lines to the island until 1875, when the Gulf, Colorado and Santa Fe Railway built its own bridge. At the end of the 19th century, a group of investors established Texas City directly across the West Bay from Galveston with the hope of making it a competing port city. The port began operations just before the start of the 20th century.