Okolnichy (Russian: Око́льничий, IPA: [ɐˈkolʲnʲɪtɕɪj]) was an old rank and a position at the court of Moscow rulers from the Mongol invasion of Rus' until the government reform undertaken by Peter the Great. The word is derived from the Russian word for "close," "near," meaning "sitting close to the Tsar."
Initially their number was very small, but it grew over time and they acquired more duties. An okolnichy could head a state office (prikaz) or a regiment, could be an ambassador or a member of the state duma.
Initially the rank of okolnichy was the second highest after that of boyar, while often they performed similar duties. According to the system of mestnichestvo, a person could not be made boyar, unless someone else in his family had recently held a boyar/okolnichy rank. Consequently, a position of okolnichy was a step towards granting the boyar rank to a non-noble. Even Prince Dmitry Pozharsky, though a Rurikid knyaz by birth and the "Saviour of Fatherland" by royal mercy, could not secure a position higher than okolnichy, because neither his parents nor uncles had ever held a rank higher than stolnik.
Under the Romanovs, the 18 noblest families of Muscovy were given the privilege of starting their official career from the rank of okolnichy, skipping all the lower ranks, such as stolnik. At the same period, the positions of okolnichy were differentiated and some of them (quarters okolnichy or close okolnichy) were of higher rank than that of non-close boyars. The terms derive from a semi-formal ranking based on the proximity to the tsar at the tsar's table.