Sir Sri Ayilyam Thirunal Rama Varma IV GCSI CIE (1832–1880) reigned as Maharaja of Travancore from 1860 to 1880.
Ayilyam Thirunal's early education was provided privately and later T. Madhava Rao was appointed tutor to the Elaya Rajah and his brother in 1848.
Assisted by his Dewan T. Madhava Rao, the Maharajah implemented many reforms and changes in Travancore, which were all agreeably beneficial for the state.
In the same year the British Government officially granted the title of Maharajah to Ayilyam Thirunal, who was in formal communications so far addressed only as Rajah.
However, by now the relations between the Maharajah and his Dewan, now styled Rajah Sir T. Madhava Rao had turned sour and the latter was retired on a lavish pension of Rs.
The little name and fame I have acquired is in reality but the light reflected on the servant by an illustrious master, to serve whom, even for a brief period, has been my pride and privilegeSeshayya Sastri was later admitted into the Order of the Star of India.
During his premiership which lasted until 1880 irrigation was expanded in Travancore, museums and other institutions were established, surveys of land and agriculture etc.
After the death of Thiruvattar Ammachi, his first consort, the Maharajah married again in 1862 Kalyanikutty Amma of Mathruppillil, a prestigious family of Nadavarambu, Irinjalakuda, Thrissur in the neighbouring state of Cochin.
She was born in 1839 as the only daughter of Nadavarambathu Kunju Krishna Menon, a former Dewan of Cochin and his wife Mathruppillil Lakshmi Amma.
Kalyanikutty Amma was a woman of renowned beauty and the first commission given to Raja Ravi Varma by Ayilyam Thirunal was for her portrait.
The first decade of the Maharajah's reign was happy and peaceful but several problems arose after the dismissal of Dewan Madhava Rao.