The Ruthenian language was used in Lithuania and its capital Vilnius due to the incorporation of the Kievan Rus' lands. In colloquial form, these dialects formed the basis of the Ukrainian and Byelorussian languages in the 19th century. The written form of the Ruthenian language formed from the interaction of the ancient Slavic language with the local elements of the Ruthenian language. Such a Ruthenian language became the main language of the Chancery of the Grand Duchy of Lithuania in the 14th and 15th centuries and maintained its dominant position until the middle of the 17th century.