From 1819 to 1839 it served as the state capital of Illinois .
It was the capital of Illinois from 1819 to 1839 .