The Iranian government is led by an elected president but ultimate power rests with the Supreme Leader, who is chosen for life by the Assembly of Religious Experts. All laws must conform to Islamic principles as interpreted by the Guardian Council of clerics. The constitution was written in 1979 after the Islamic revolution and establishes Iran as an Islamic republic where elected bodies like the president and Majles coexist with unelected institutions like the Guardian Council and Supreme Leader that ensure conformity with Sharia law.