A nationwide judicial system in Iran was first implemented and established by Abdolhossein Teymourtash under Reza Shah, with further changes during the second Pahlavi era. After the 1979 overthrow of the Pahlavi dynasty by the Islamic Revolution, the system was greatly altered. The legal code is now based on Islamic law or sharia, although many aspects of civil law have been retained, and it is integrated into a civil law legal system.