Complex sentence: He was then re-elected to the Senate by the Iowa legislature as a Republican and continued to hold the Senate seat until 1865 when he resigned to become Secretary of the Interior under President Andrew Johnson, an office he held until 1866.
Split into simpler sentences: He was then re-elected to the Senate by the Iowa legislature as a Republican and continued to hold the Senate seat until 1865. In 1865 he resigned to become Secretary of the Interior under President Andrew Johnson, an office he held until 1866.