Master of laws
The master of laws, later called the justiciar, is the king's advisor relating to the administration of justice and is a member of the small council in King's Landing. Duties of the master of laws include managing the dungeons at the Red Keep and supervising the chief gaoler, chief undergaoler, undergaolers, and the King's Justice.
A Game of Thrones
A Clash of Kings
With Renly claiming the throne for himself after Robert's death, the position lies vacant. Renly's brother Stannis, who has also crowned himself, offers to keep him on as master of laws, but has him assassinated when Renly refuses. After Stannis's failed attempt to take the capital, Ser Kevan Lannister serves as master of laws for King Joffrey Baratheon.
A Storm of Swords
Kevan Lannister fills the office in name, but is distraught over his remaining sons' peril and accomplishes little.
A Feast for Crows
After the death of Tywin Lannister, Queen Regent Cersei renames the office justiciar in the style of the Free Cities. Ser Kevan abandons the court after the death of Lord Tywin. Lord Orton Merryweather, Cersei's new justiciar, flees to Longtable when the queen is arrested.
A Dance with Dragons
List of known masters of laws
- Lord Triston Massey, who served Aegon the Conqueror.
- Lord Prentys Tully, who served Jaehaerys I Targaryen. 
- Lord Albin Massey, who served Jaehaerys I Targaryen. 
- Lord Rodrik Arryn, who served Jaehaerys I Targaryen.
- Prince Aemon Targaryen, who served his father, Jaehaerys I Targaryen.
- Prince Daemon Targaryen, who served his brother, King Viserys I Targaryen, for half a year in 104 AC.
- Lord Lyonel Strong, served King Viserys I Targaryen until being raised to Hand of the King.
- Lord Jasper Wylde, the Ironrod, who served King Viserys I Targaryen and King Aegon II Targaryen.
- Lord Thaddeus Rowan, who served Aegon III Targaryen as master of laws, until he was later raised to be Hand of the King.
- Lord Symond Staunton, who served Aerys II Targaryen. 
- Lord Renly Baratheon, who served his brother Robert I until Robert's death.
- Ser Kevan Lannister, appointed after the Lannister victory in the Battle of the Blackwater.
- Lord Orton Merryweather - Justiciar. Named by Cersei Lannister after Ser Kevan leaves the city upon Lord Tywin Lannister's death.
- Lord Randyll Tarly - Justiciar and master of laws. After Lord Merryweather flees the city after Cersei's arrest by the Faith, the Hand Mace Tyrell and the Regent Kevan Lannister appoint Lord Tarly.
- The World of Ice & Fire, The Reign of the Dragons: The Conquest.
- The Princess and the Queen.
- A Game of Thrones, Appendix.
- A Storm of Swords, Appendix.
- A Feast for Crows, Chapter 17, Cersei IV.
- A Feast for Crows, Chapter 43, Cersei X.
- A Dance with Dragons, Chapter 54, Cersei I.
- Fire & Blood, The Year of the Three Brides - 49 AC.
- Fire & Blood, A Time of Testing - The Realm Remade.
- Fire & Blood, The Long Reign - Jaehaerys and Alysanne: Policy, Progeny, and Pain.
- The Rogue Prince.
- Fire & Blood, Under the Regents - War and Peace and Cattle Shows.
- The World of Ice & Fire, The Fall of the Dragons: The Year of the False Spring.