Answer
Sócrates' political career ended when he abandoned the Socialist Party. He had been a member of the party since 1975, and had served as prime minister from 2005 to 2011. However, in 2014, he was expelled from the party after being found guilty of corruption. This marked the end of his political career, and he has not held any public office since.