The youngest daughter of King Felipe VI and Queen Letizia of Spain is to attend a British boarding school, following in her sister's footsteps.
Princess Sofia, 15, will join UWC Atlantic College, in the Vale of Glamorgan, Wales, in late August or early September.
Her sister Princess Leonor, 17, the heiress to the Spanish throne, will leave the school this summer.
The school is favoured by European royalty, with alumni including Crown Princess Elisabeth of Belgium, King Willem-Alexander of the Netherlands and Princess Raiyah of Jordan.
It has been nicknamed "Hippy Hogwarts" by some, partly because of where it is based — inside the 12th century St Donat’s Castle — and partly thanks to its focus on public good and global sustainability.
UWC has 18 schools and colleges on four continents which “deliver a challenging and transformational education to over 10,500 students each year”, the group says.
Princess Sofia will study a two-year International Baccalaureate programme. The total fees will amount to €74,000 (£66,000).
The royal household said the princess had passed the entrance tests and would study subjects including both science and the arts. She will also be able to take part in activities like theatre, music and art, as well as sports, it added.
She is also expected to get involved in community activities such as supporting local schools or working with children with intellectual disabilities.
According to El Pais, Leonor is more “thoughtful” than Sofia. Both are football fans. Leonor supports Atletico and Sofia follows Real Madrid.
St Donat’s Castle has remained in continuous occupation since it was built in the 12th century and was once owned by American media magnate William Randolph Hearst, who is said to be the model for Orson Welles's famous film, Citizen Kane.