Spain's former king Juan Carlos is leaving the country to live abroad after being caught in financial corruption allegations that have exploded over the summer.<br/> The Spanish royal family's website confirmed the move and published a letter from Juan Carlos to his son, King Felipe VI, on Monday in which he said the decision was taken "with deep feeling but great calm". "Guided by my desire to do what is best to serve the Spanish people, its institutions and you as king, I am informing you of my … decision to leave Spain at this time," he wrote. The swift exit was designed to protect the monarchy from becoming entwined in Juan Carlos's scandal, Reuters reported. However, Spaniards appear divided on whether the exile was right or if the former monarch should have stayed to face a trial. <br/> Spanish Prime Minister Pedro Sanchez has said he found the allegations against Juan Carlos "disturbing". Pressure had been building for weeks on the former king and his son to take action to shore up the monarchy after Spanish and Swiss prosecutors started looking into bribery allegations related to high-speed rail contracts. <br/> It was not immediately known where Juan Carlos, 82, had moved although Portuguese TV and tabloids suggested he was in the resort town of Cascais near Lisbon where he spent part of his childhood, but offered no sourcing for the claim. Other reports suggested he was on his way to the Dominican Republic via Portugal. Switzerland's<em> La Tribune de Genève</em> newspaper reported in March that Juan Carlos had received $100 million (Dh367m) from a previous Saudi administration over a high-speed rail contract. That was followed by a regular drip-feed of allegations in the Spanish media, which included that he gave much of the money to a former mistress. Through his lawyer, Javier Sanchez-Junco, Juan Carlos has repeatedly declined to comment on the corruption allegations.<br/> On Monday, Mr Sanchez-Junco said in a brief statement that the former king, who ruled for 40 years, would "remain at the disposal of the prosecutors' office". Spanish monarchs have immunity during their reign but Juan Carlos's abdication potentially leaves himself vulnerable to prosecution. Juan Carlos came to the throne in 1975 after the death of General Francisco Franco and was widely respected for his role in helping guide Spain from dictatorship to democracy. But his popularity sank in later years owing to a series of scandals, prompting him to step down in 2014. Deputy Prime Minister Pablo Iglesias, of the leftist Podemos party, said the decision to leave would damage the monarchy in Spain. "Juan Carlos de Borbon's flight abroad is an act unworthy of a former head of state and it leaves the monarchy in a very compromised position," Mr Iglesias said on his Facebook page. Opinion polls have shown that Spaniards are roughly equally split over whether their country should remain a monarchy or become a republic – a step that is impossible under the current constitution, itself very hard to change amid a highly fragmented parliament. The government had repeatedly asked King Felipe to take steps to distance himself further from Juan Carlos after he put an end to his father's palace allowance and renounced his own inheritance in March, following allegations of secret offshore accounts reported to be linked to the Saudi rail contract. <em>– additional reporting by agencies </em>