She grew up in Tehran as the daughter of a middle-class civil servant descended from a member of the Qajar dynasty , which ruled Iran for 125 years before a 1921 coup by Reza Khan , an army officer , led to his election as hereditary shah four years later and the establishment of the Pahlavi dynasty .