 In 1836 , the Wisconsin Territory was formed from the western section of the Michigan Territory . Chapman became the first U.S. Attorney for this new territory when it was created . He was elected as colonel of the militia in 1836 after moving to what is now Dubuque , Iowa . Then in 1838 , the Iowa Territory was carved from the Wisconsin Territory . 
