For almost all of its long history, except for a few brief periods, Paris was governed directly by representatives of the king, emperor, or president of France. The city was not granted municipal autonomy by the National Assembly until 1974. For all but 14 months from 1794 to 1977, Paris was the only French commune without a mayor, and thus had less autonomy than the smallest village. For most of the time from 1800 to 1977 (except briefly in 1848 and 1870-71), it was directly controlled by the departmental prefect (the prefect of the Seine until 1968, and the prefect of Paris from 1968 to 1977).