The Diwan or Dewan of Travancore was the head of government of Travancore in the nineteenth and twentieth centuries, serving at the pleasure of the Maharaja, corresponding to a prime minister, and consisting in the formal titles Valiya Sarvadhikaryakar and Dalawa until the insurrection of Velu Thampi Dalawa and administrative reforms of John Munro. Post-Munro, the title of Dalawa, which remained formally the highest ranking established office, though administratively impotent, was revived as a sinecure to sideline Raman Menon and remove him from the Diwanship. The office of Diwan existed until 1948, when it gave way to the office of Prime Minister of Travancore.