Hours after 76-year-old Juan Carlos said Monday he was handing over the crown to his more popular son Crown Prince Felipe, thousands of protesters filled Madrid's central Puerta del Sol square calling for a vote on the monarchy.
Republican sentiment remains widespread in Spain, which only restored the monarchy in 1975 after the death of General Francisco Franco, who had ruled for four decades.
"I think the monarchy has the support of the great majority in Spain," Rajoy said when asked about calls for a referendum on the monarchy during The Economist newspaper's June 3rd Spain Summit in Madrid.
"Propose a constitutional reform if you don't like this constitution. You have the perfect right to do so. But what you cannot do in a democracy is bypass the law," Rajoy said.
Spain's 1978 constitution which established the monarchy was supported by a great majority of Spaniards in a referendum at the time, the prime minister said.
Juan Carlos was widely respected for smoothing Spain's transition to democracy after the death of General Francisco Franco in 1975, most famously facing down an attempted military coup in February 1981.
But many Spaniards were outraged when they discovered the king took a luxury elephant-hunting trip to Botswana in 2012 as they struggled to find jobs in a recession.
Resentment over the monarchy grew when the king's younger daughter Cristina was named a suspect in relation to her husband Inaki Urdangarin's allegedly corrupt business practices.
Rajoy's government met on Tuesday to draw up a draft law on the succession, which must then go to parliament for approval, clearing the way for the future King Felipe VI.
Spain's main political parties, the ruling conservative Popular Party and the opposition Socialist Party, support the monarchy.
Parties including the left-wing Izquierda Unida and European elections surprise package Podemos have, however, called for a referendum on the future of the institution.