Count Pyotr Andreyevich Tolstoy (Russian: Пётр Андреевич Толстой) (1645–1729) was a Russian statesman and diplomat, prominent during and after the reign of Peter the Great. He was the ancestor of all the Counts Tolstoy, including the novelist Leo Tolstoy (September 9 [O.S. August 28], 1828 – November 20 [O.S. November 7], 1910) and Alexei Tolstoy the writer. His wife was Solomonic Timofeevna Dubrovskaya born 1660 and died 1722; he had two sons with her, Ivan (born 1685) and Peter (born 1680). Both his sons died in exile with him the year before his own death. He was, however, survived by many grandchildren: the family was recalled by the Empress Elizabeth, daughter of Peter the Great in 1760, and had all honors and land restored.
Some historians assume Pyotr Tolstoy to have been an "okolnichy", while others consider he came from a "boyar" background. He served in 1682 as Chamberlain at the court of childless Tsar Feodor III Alekseevich, Tsar 1676–1682. On account of his family relationship with the Miloslavsky family, he miscalculated the strength of the tsarevna Sophia Alekseyevna, (September 17 [N.S. September 27], 1657 – regent of Russia (1682–1689) – July 3 [N.S. July 14], 1704), full sister of Feodor III and third daughter, also, of Tsar Alexei I of Russia by his first wife, Maria Miloslavskaya and became one of her most energetic supporters, but contrived to join the other, and winning, side just before the final catastrophe.
Peter was the only son of Tsar Alexei I of Russia's second marriage (to Nataliya Kyrillovna Naryshkina), and therefore, was the younger half-brother of childless Tsar Feodor III and of Sophia, temporary regent of Russia. For a long time Peter kept his latest supporter at arm's length. However, in 1697, Tolstoy volunteered to go to Venice to learn Italian and ship-building, and Peter could not resist the subtle flattery implied in such a proposal from a middle-aged Muscovite noble.