Through the interest of friends he obtained leave from the tsar to retire from the army, and settled in 1827 in Muranovo near Moscow (now a literary museum).