Chancellor of Poland ( - , from ) was one of the highest officials in the historic Poland. This office functioned from the early Polish kingdom of the 12th century until the end of the Polish–Lithuanian Commonwealth in 1795. A respective office also existed in the Grand Duchy of Lithuania since the 16th century. Today the office of the chancellor has been replaced by that of the Prime Minister. Chancellors' powers rose together with the increasing importance of written documents. In the 14th century the office of Chancellor of Kraków () evolved into the Chancellor of the Crown () and from that period the chancellor powers were greatly increased, as they became responsible for the foreign policy of the entire Kingdom (later, the Commonwealth). The Chancellor was also supposed to ensure the legality of monarch's actions, especially whether or not they could be considered illegal in the context of pacta conventa (an early set of documents containing important laws, in some aspects resembling today's constitutions). Finally, the Chancellor was also responsible for his office, the chancellery (). A 16th-century Polish lawyer, Jakub Przybylski, described the Chancellor as the king's hand, eye and ear, translator of his thoughts and will. From 15th century onward there were two separate Chancellor offices, neither of them subordinate to the other: Great Chancellor () and Vice-Chancellor (). In the Polish-Lithuanian Commonwealth, there were four Chancellors: Great Chancellor of the Crown (), Great Chancellor of Lithuania (), Vice-Chancellor of the Crown (), and Vice-Chancellor of Lithuania (). History During the times of fragmentation of Poland, each Polish prince had his own chancellor, but with the reunification of Poland, the office of Chancellor of Kraków (contemporary capital of the Kingdom of Poland) became dominant and other, local chancellors disappeared by the early 15th century. Also in the 15th century, the Chancellor's office was split into that of the Great Chancellor and Vice-Chancellor. The Vice-Chancellor was, however, not a subordinate of the Chancellor and his independence was specifically confirmed by the laws passed during the reign of king Alexander Jagiellon. The Sejm of 1504 confirmed the Chancellor's office as well as its powers and responsibilities for the first time, specifically stating that one person cannot hold both Chancellors' offices, and established the Grand Lithuanian Chancellor's office. The Lithuanian Vice-Chancellor was created later, in the mid-16th century After the Union of Lublin in 1569 there were four Chancellors (one