People wave Republican flags during an anti-royalist demonstration in Oviedo
People wave Republican flags during an anti-royalist demonstration in Oviedo June 2, 2014. Spain's King Juan Carlos said on Monday he would abdicate in favour of his son Prince Felipe, aiming to revive the scandal-hit monarchy at a time of economic hardship and growing discontent with the wider political elite. REUTERS/Eloy Alonso

King Juan Carlos I of Spain is going to step down after ruling for almost 40 years. Here are the things you should know about the king who ruled Spain for nearly 40 years.

Early Life & Marriage

Juan Carlos Alfonso Víctor María de Borbón y Borbón-Dos Sicilias was born in Rome on January 5, 1938. He moved to Spain in 1948 for education. After finishing his education, he joined the army in 1955 and served until 1957. Juan Carlos got married to Princess Sofia of Greece in May 1962.

The Early Years

It was in November 1975 when Juan Carlos was elected as the "king of all Spaniards, without exception." Franco's supporters wanted to continue the autocracy but he ignored their demands. He introduced a parliamentary monarchy system in Spain. Juan Carlos is highly respected in Spain because of the way he stood up for democracy in 1975 after the dictator Francisco Franco had passed away.

The Failed Military Coup

Juan Carlos is often remembered with high regard for his stand against the military coup in 1981 when he declared on national television that the monarchy was in no mood to allow a forceful interruption of the democratic society in Spain. The rebels surrendered in due course after realising that there was a lack of support for them within the military.

Controversies

Juan Carlos' brother Alfonso was killed in a gun accident in 1956. While it was officially announced that Alfonso fired himself when he was cleaning a revolver, there was a controversy that it was Juan Carlos who had killed his brother. According to Snopes, he even "felt responsible" for the death of his brother.

The 76-year-old had a rough time in 2012 when he was involved in an alleged elephant hunting trip to Africa. The incident became even more controversial as Spain was in the middle of an economic disaster during that time.

The Succession

CNN reported that 46-year-old Crown Prince Felipe would succeed his father, according to the announcement made by Prime Minister Mariano Rajoy in his address on TV. There was no explanation given on the prime minister's part on why the kind decided to step down. While Felipe has been groomed for long to be the successor of his father, the decision does not come as a surprise, BBC reported.

Contact the writer: s.mukhopadhyay@ibtimes.com.au