Until the middle of the 20th century, Afghanistan was ruled by the absolute power of the king. Two constitutions were promulgated, in 1923 and 1931, both affirming the power of the monarchy. The constitution of 1964, however, provided for a constitutional monarchy, based on the separation of executive, legislative, and judicial authorities. A military coup in 1973 overthrew the monarchy, abolished the constitution of 1964, and established the Republic of Afghanistan. The Grand National Assembly (Loya Jirgah) adopted a new constitution in February 1977, but it was abrogated in 1978 when another coup established the Democratic Republic of Afghanistan, governed by the Afghan Revolutionary Council. Political turmoil continued, marked by a third coup in September 1979, a massive invasion of troops from the Soviet Union, and the installation of a socialist government in December 1979. A new constitution promulgated in 1987 changed the name of the country back to the Republic of Afghanistan and reaffirmed its nonaligned status, strengthened the post of president, and permitted other parties to participate in government.
The highest government authority is vested in the Grand National Assembly, a body defined as "the highest manifestation of the will of the people of Afghanistan" and made up of members of the executive, legislative, and judicial branches. The Grand National Assembly has the power to elect the president, amend and interpret the constitution, declare war, and adopt decisions on "the most important questions concerning the country's national destiny." The head of state and commander in chief of the armed forces is the president, who is elected for a seven-year term. The Council of Ministers is the highest executive body and is responsible for domestic and foreign policy. The National Assembly is the highest legislative body and comprises a 192-member council of elders and a 234-member council of representatives.
Afghanistan has a centralized system of local government. For administrative purposes the country is divided into provinces, each administered by a centrally appointed governor. The provinces are further subdivided into districts and sub-districts, headed by appointed commissioners.
In April 1992 The communist government was overthrown by the various Islamist Parties that established the first Islamic Republic of Afghanistan. This regime was driven out as result of internal warfare by the student militia of Taliban which established the Islamic Emirate of Afghanistan in September 1996.