The embattled head of the Spanish Socialists Pedro Sanchez has resigned after losing a vote among top party members.

His resignation, which he announced yesterday, could see the party lift its veto on a new government led by acting conservative Prime Minister Mariano Rajoy.

Since December 2015, the country has been without a fully-functioning executive as rivals have failed to agree on a government following two elections in which none of the main parties won an absolute majority.