Pedro Sanchez is the Socialist Prime Minister of Spain. It has been on his watch that the Moroccan invasion of the Ceuta enclave has occurred.
He is very unpopular with Spanish voters. It is unclear why he has now called a "snap election" in late November that it's likely his Socialists will lose.
Maybe he's made such a mess that his party would rather be out of power where they can carp at whoever replaces him. It is always easier to complain and criticize than to fix problems.