Mannerheim's great-grandfather, Count Carl Erik Mannerheim (1759–1837), had held a number of offices in Finland's civil service during the early years of the autonomous Russian Grand Principality of Finland, including membership in the Senate, and served as the first Prime Minister of Finland (formally the Vice Chairman of the Economic Department of the Senate—the Senate consisted of the Economic Department, later the cabinet, and the Justice Department, later the Supreme Court; the formal chairman of both was the Governor General as the acting head of state). In 1825, Carl Erik Mannerheim was promoted to the rank of Count (in Finnish Kreivi, in Swedish Greve). Mannerheim's grandfather, Count Carl Gustaf Mannerheim (1797–1854), was a renowned entomologist and served as President of the Viipuri Court of Appeals. Mannerheim's grandmother Countess Eva Wilhelmina Mannerheim, née von Schantz, was one of the leading figures in Finnish high society.