As a center of the regional economy , Kaskaskia served as the capital of Illinois Territory from 1809 until statehood was gained in 1818 , and then as the state capital until 1819 .
As a center of the regional economy , Kaskaskia was the capital of Illinois Territory from 1809 until Illinois became a state in 1818 .