Spain's Prime Minister Pedro Sanchez has said he will suspend public duties to "stop and reflect" on whether he wants to continue in frontline politics in a letter shared on his X social media account.

"I urgently need an answer to the question of whether it is worthwhile (...) whether I should continue to lead the government or renounce this honor," he said in the letter.

The shock announcement came after a Spanish court said earlier on Wednesday that it was launching a preliminary investigation into whether Sanchez's wife, Begona Gomez, had committed a crime of influence peddling and corruption in business in her private dealings.