According to the Norwegian constitution, the king was to appoint his own cabinet. Because the king mostly resided in Stockholm, a section of the cabinet led by the prime minister had to be present there, accompanied by two ministers. The first prime minister was Peder Anker, who had been prominent among the Norwegians who framed the constitution, and had openly declared himself to be in favor of the Union. The Norwegian government acquired a splendid town house, "Pechlinska huset", as the residence of the cabinet section in Stockholm, which also served as an informal "embassy" of Norway. The other six Christiania-based ministers were in charge of their respective government departments. In the king's absence, meetings of the Christiania cabinet were chaired by the viceroy ("stattholder"), appointed by the king as his representative. The first to hold that office was count Hans Henrik von Essen, who had already at the conclusion of the Kiel treaty been appointed governor-general of Norway when the expected Swedish occupation would be effective.