Updated

The cabinet of Spanish Prime Minister Mariano Rajoy on Tuesday approved a proposal for emergency legislation that allows King Juan Carlos to abdicate and hand over his duties to Crown Prince Felipe.

The proposal will be fast-tracked by the Spanish Parliament and is expected to pass easily because Rajoy's center-right Popular Party has the majority of seats and the leading opposition Socialist Party also supports the legislation.

Jesus Posada, who leads the Parliament's lower house, predicted the law will take effect by June 18, meaning Felipe would be proclaimed king before lawmakers shortly after that.

The 76-year-old king and Felipe, 46, participated Tuesday at a military ceremony outside Madrid as Rajoy met with his cabinet.

Juan Carlos appeared frail as he emerged from a car with his son, pacing slowly with a cane to a podium where the two watched soldiers parading decked out in dress uniforms. As Juan Carlos and Felipe arrived, people shouted "Long Live the King!" and "Long Live the Prince."

Juan Carlos is widely respected for leading Spain's transition from dictatorship to democracy and staring down a 1981 coup attempt, but was hit hard by royal scandals over the last several years.

He announced Monday he was abdicating because his son is ready for the job and because Spain needs a "new era of hope."

The most disastrous scandal for Juan Carlos was a secret 2012 elephant hunting trip he took to Botswana at the height of Spain's financial crisis. It became public after he fell and broke his hip, requiring him to take a private jet back to Spain for treatment.

The monarchy's popularity has also been hurt by a criminal investigation into the king's son-in-law, Inaki Urdangarin, on suspicion of embezzling large amounts in public contracts.

Juan Carlos' youngest daughter, Princess Cristina, was forced to testify this year in the fraud and money-laundering case targeting her husband, an Olympic handball medalist turned businessman.