The state supreme power belonged to the General Cossack (Military) Council, while the office of head of state was presided by the Hetman. There also was an important advising body Council of Officers (Starshyna). The hetman was initially chosen by the General Council, consisting of all cossacks, townspeople, clergy and even peasants. By the end of the 17th century, however, its role became more ceremonial as the hetman came to be chosen by the Council of Officers and the Hetmanate itself was turning into an authoritarian state. After 1709, the Battle of Poltava, hetman nomination was to be confirmed by the tsar. Hetman presided until he either died or was forced out by the General Cossack Council. The office of hetman had complete power over the administration, the judiciary, the finances, and the army. His cabinet functioned simultaneously as both the general staff and as the cabinet of ministers. The Hetman also had the right to conduct foreign policy, although this right was increasingly limited by Moscow in the 18th century.