Petar I's final years were defined by his deteriorating health and continuing inability to find a successor—ideally both a Petrović and a literate monk—capable of carrying on his role. Petar's first candidate was Mitar M. Petrović, the son of his eldest brother Stjepan. Within several years, the younger Petrović died and Petar was forced to find a different successor. He turned his attention to Đorđije S. Petrović, his middle brother's son. As Đorđije was illiterate, Petar sent him to Saint Petersburg to attend school. Once there, Đorđije realized that he preferred living in Russia over Montenegro. In 1828, he sent his uncle a letter from Saint Petersburg informing him that he wished to enroll into the Imperial Russian Army and asking to be relieved of succession. In 1829, Petar informed Jeremija Gagić, an ethnic Serb who served as the Russian vice-consul in Dubrovnik and was in charge of all of Russia's dealings with Montenegro, that Đorđije had his permission to enter the Russian military, depriving him of his right to the throne.