The comparisons with the man who became America 's 16th president in 1861 were unmistakable -- Mr Lincoln had also spent just eight years in the Illinois state legislature and one term in Washington , mirroring Mr Obama 's own political career .