Spain's King Juan Carlos, who led Spain's transition from dictatorship to democracy, will abdicate so his son Felipe can become the country's next monarch.

Prime Minister Mariano Rajoy did not say when the handover would happen because the government must now make a law creating a legal mechanism for the abdication.

King Juan Carlos came to power in 1975, two days after the death of General Franco. He was a hero to many for guiding Spain's democratic and economic transformation.

His popularity took a big blow following royal scandals, including an elephant-shooting trip in Botswana. His image was also tarnished by the investigation of his son-in-law, suspected of embezzling large amounts through public contracts.

Prince Juan Carlos of Spain is pictured at the Military Academy of Zaragoza between 1955-57 and at a military parade in Madrid in 1959. Prince Juan Carlos was born in Rome, where his grandfather Alfonso XIII of Spain had been exiled after the proclamation of the Second Spanish Republic. Juan Carlos moved to Spain in 1948 to be educated after his father persuaded Franco to allow his return
Prince Juan Carlos of Spain is pictured at the Military Academy of Zaragoza between 1955-57 and at a military parade in Madrid in 1959. Prince Juan Carlos was born in Rome, where his grandfather Alfonso XIII of Spain had been exiled after the proclamation of the Second Spanish Republic. Juan Carlos moved to Spain in 1948 to be educated after his father persuaded Franco to allow his returnAFP/Getty
14 May 1962: Prince Juan Carlos of Spain marries Princess Sophia of Greece and Denmark, in Athens. Queen Sofi­a was born in Athens on 2 November 1938, the first daughter of King Paul I of Greece. Her family was forced to flee Greece during World War II. She was Greek Orthodox but converted to Roman Catholicism
14 May 1962: Prince Juan Carlos of Spain marries Princess Sophia of Greece and Denmark, in Athens. Queen Sofi­a was born in Athens on 2 November 1938, the first daughter of King Paul I of Greece. Her family was forced to flee Greece during World War II. She was Greek Orthodox but converted to Roman CatholicismAFP
May 1962: Prince Juan Carlos of Spain and his wife Princess Sophia of Greece and Denmark are pictured in Athens shortly after their wedding
May 1962: Prince Juan Carlos of Spain and his wife Princess Sophia of Greece and Denmark are pictured in Athens shortly after their weddingAFP
26 May 1974: General Francisco Franco and Prince Juan Carlos watch the Victory Parade in Madrid
26 May 1974: General Francisco Franco and Prince Juan Carlos watch the Victory Parade in MadridGetty
Former Spanish dictator General Francisco Franco speaks from the balcony of Madrid's Royal Palace next to the then Prince Juan Carlos of Spain in this undated photo
Former Spanish dictator General Francisco Franco speaks from the balcony of Madrid's Royal Palace next to the then Prince Juan Carlos of Spain in this undated photoReuters
Prince Juan Carlos salutes during the funeral of General Franco at Valle de Caidos
Prince Juan Carlos salutes during the funeral of General Franco at Valle de CaidosGetty
22 November 1975: King Juan Carlos I and Queen Sofia, with their children Felipe, Elena and Cristina, leave Parliament after his coronation
22 November 1975: King Juan Carlos I and Queen Sofia, with their children Felipe, Elena and Cristina, leave Parliament after his coronationGetty
November 1975: King Juan Carlos I addresses Parliament in Madrid
November 1975: King Juan Carlos I addresses Parliament in MadridGetty
Left: Lieutenant-Colonel Antonio Tejero de Molina took the cabinet and some 350 MPs hostage in February 1981, during an attempted coup. Right: Prime Minister Adolfo Suarez bows his head to King Juan Carlos after he was released by rebels who had held him and 350 members of Parliament hostage for 17 hours
Left: Lieutenant-Colonel Antonio Tejero de Molina took the cabinet and some 350 MPs hostage in February 1981, during an attempted coup. Right: Prime Minister Adolfo Suarez bows his head to King Juan Carlos after he was released by rebels who had held him and 350 members of Parliament hostage for 17 hoursAFP
9 August 1988: Prince Charles and Princess Diana and their sons Prince Harry and Prince William visit King Juan Carlos at Marivent Palace in Palma De Mallorca
9 August 1988: Prince Charles and Princess Diana and their sons Prince Harry and Prince William visit King Juan Carlos at Marivent Palace in Palma De MallorcaReuters
8 August 1993: King Juan Carlos of Spain is thrown into a swimming pool after winning the King's Cup Yacht Race in Palma de Mallorca
8 August 1993: King Juan Carlos of Spain is thrown into a swimming pool after winning the King's Cup Yacht Race in Palma de MallorcaReuters
22 May 2004: Crown Prince Felipe and his new bride Princess Letizia are flanked by his mother and father King Juan Carlos and Queen Sofia on the balcony of the Royal Palace after their wedding ceremony in Madrid
22 May 2004: Crown Prince Felipe and his new bride Princess Letizia are flanked by his mother and father King Juan Carlos and Queen Sofia on the balcony of the Royal Palace after their wedding ceremony in MadridReuters
5 June 2008: King Juan Carlos reaches out to get the cap thrown by matador Javier Conde during a bullfight at Madrid's Las Ventas bullring
5 June 2008: King Juan Carlos reaches out to get the cap thrown by matador Javier Conde during a bullfight at Madrid's Las Ventas bullringReuters
30 May 2010: King Juan Carlos helps Queen Sofia as she stumbles during celebrations marking Spanish Armed Forces Day in Badajoz
30 May 2010: King Juan Carlos helps Queen Sofia as she stumbles during celebrations marking Spanish Armed Forces Day in BadajozReuters
12 July 2010: King Juan Carlos holds the World Cup trophy as he poses with Iker Casillas and the Spanish team during a reception at Madrid's Royal Palace
12 July 2010: King Juan Carlos holds the World Cup trophy as he poses with Iker Casillas and the Spanish team during a reception at Madrid's Royal PalaceReuters
6 January 2011: King Juan Carlos I and Queen Sofia attend the Pascua Military ceremony at the Royal Palace in Madrid
6 January 2011: King Juan Carlos I and Queen Sofia attend the Pascua Military ceremony at the Royal Palace in MadridGetty
King Juan Carlos poses in front of a dead elephant on a hunting trip in Botswana, Africa, in this photo that was posted on the website of Rann Safaris in 2012
King Juan Carlos poses in front of a dead elephant on a hunting trip in Botswana, Africa, in this photo that was posted on the website of Rann Safaris in 2012
25 November 2013: King Juan Carlos leaves the Quiron University Hospital in Madrid after having his left hip replaced for the third time
25 November 2013: King Juan Carlos leaves the Quiron University Hospital in Madrid after having his left hip replaced for the third timeAFP
6 January 2014: Prince Felipe and King Juan Carlos attend the New Year's Military Parade at the Royal Palace in Madrid
6 January 2014: Prince Felipe and King Juan Carlos attend the New Year's Military Parade at the Royal Palace in MadridGetty
31 March 2014: King Juan Carlos arrives for the state funeral of former Spanish Prime Minister Adolfo Suarez at Madrid's Almudena Cathedral. Suarez, who died on March 23, steered Spain through one of the most turbulent periods in its political history and built bridges between the
31 March 2014: King Juan Carlos arrives for the state funeral of former Spanish Prime Minister Adolfo Suarez at Madrid's Almudena Cathedral. Suarez, who died on March 23, steered Spain through one of the most turbulent periods in its political history and built bridges between the "two Spains" after fascist dictator General Francisco Franco died in 1975Reuters
20 April 2014: Princess Letizia, Crown Prince Felipe, Queen Sofia, her granddaughters Infanta Sofia, and Infanta Leonor, King Juan Carlos and Infanta Elena pose before attending an Easter mass at the cathedral in Palma de Mallorca
20 April 2014: Princess Letizia, Crown Prince Felipe, Queen Sofia, her granddaughters Infanta Sofia, and Infanta Leonor, King Juan Carlos and Infanta Elena pose before attending an Easter mass at the cathedral in Palma de MallorcaReuters