Even though it had lost its defensive role, it was one of the strongest fortresses in the Crown of the Kingdom of Poland up until the Second Partition of Poland of April 21, 1793. when both Kamianets-Podilskyi Castle and the city were transferred to the sovereignty of the Russian Empire. On the same day, the castle's commandant gave up the key to the castle and swore allegiance to the empire in the city's cathedral. One hundred and one artillery cannons later saluted the commandant's decision inside the castle. During the French invasion of Russia of 1812, the Russian Imperial Army was stationed in the castle. In 1815, Konstantin Batyushkov, who later became a well-known poet and writer, was stationed as an officer in the castle. In 1846, poet Vladimir Raevsky was stationed in the castle, during which time he established a pro-Decembrist organization of progressively-minded army officers.