Spain's former King Juan Carlos has decided to leave the country, the royal palace says, weeks after he was linked to an inquiry into alleged corruption.
Juan Carlos, 82, made the announcement in a letter to his son, Felipe, to whom he handed power six years ago.
He said he would be available if prosecutors needed to interview him.
In June, Spain's Supreme Court opened an investigation into the alleged involvement of Juan Carlos in a high-speed rail contract in Saudi Arabia.
It was not immediately clear where the former monarch would now reside, but Spanish press reports say he is no longer in the country.
It is a humiliating exit for a king who had seemed set to go down in history as the leader who skilfully guided Spain from dictatorship to democracy after the death of General Franco in 1975, BBC Europe correspondent Nick Beake says.
Juan Carlos abdicated in 2014 after nearly 40 years as king following a corruption investigation involving his daughter's husband and a controversial elephant hunting trip the monarch took during Spain's financial crisis.
In the letter, the former monarch wrote that he was making the decision "in the face of the public repercussions that certain past events in my private life are generating" and in the hope of allowing his son to carry out his functions as king with "tranquillity".
"Guided by the conviction to best serve the people of Spain, its institutions, and you as king, I inform you of my decision at this time to leave Spain.
"A decision I make with deep emotion but with great serenity," the letter said.