The prison was established in 1839 , one year after Iowa became a territory .
Seven years before Iowa became a state in 1846 .
The prison was established in 1839 , one year after Iowa became a territory , and seven years before it became a state in 1846 .