Since the year 1572 there existed in Poland a system of a so-called Republic of Nobles, which was nothing more than organized chaos. The Polish Nobles had declared that the King had to be elected. In the vastness of Poland lived approx. forty percent of non-Poles (Ukrainians, White Russians, Letts and Germans). Law and order was practically unknown. Since 1745 Poland stood under the influence of the steadily growing Russian Empire. During the seven year war, Russian troops passed through Poland, as if it was an annexed province. In 1764 the throne of Poland became vacant. The Russian Empress Catherine II decided to have her former favorite and close personal friend, Stanislas Poniatowski, whom she had met years ago through the English ambassador Sir Charles Hanbury-Williams, crowned King of Poland. When the Polish Nobles opposed this move, Catherine sent some troops to the Polish capital to maintain order. It was in the interest of Russia to have a certain control over Poland and thus ensuring her own western borders. Poniatowski accepted reluctantly; he loved Catherine all of his life. At that time that he still hoped to marry her and most likely felt his chances for this to happen would be much better if he were the King of Poland. But Catherine was by that time involved with Gregory Orlov and had no thoughts of marrying anyone. At the same time Turkey declared war on Russia, not to help the poor Poles, but to take advantage of the situation, when Russia was busy elsewhere.
Frederick watched for several years the developments in Poland with growing concern. He kept a sharp eye on two things: To keep the peace in Prussia at all costs and that nothing, but nothing should endanger the treaty he had with Russia. The experiences of the seven year war had convinced Frederick, that Prussia's greatest chance of survival could only be found in a peaceful coexistence with the mighty Empire in the East. Twice Frederick met with the Emperor Joseph II, the oldest son and co-ruler of Maria Theresa. In contrast to his mother, Joseph seemed to admire the Prussian King. But Frederick was polite and very careful not to jeopardize his alliance with Russia.
Russian troops were occupying Poland, and Poniatowski gladly did everything he could to please Catherine. The hostilities between Russia and Turkey threatened to involve the Austrians, who were not willing to leave Moldavia and the Walachia, the Rumania of today, to the Russians. If it came to yet another armed conflict, Prussia would be on Russia's side, and another terrible world war would be unavoidable. How could this catastrophic possibility be prevented?
Through clever political moves one could perhaps maneuver Austria and Russia in the position, that all three nations, Russia, Austria and Prussia would get a slice of the big Polish pie, at least this must have been the way Frederick's mind was working. But he again played the waiting game, and at the end of 1770 the Austrians occupied part of Poland under a doubtful claim. They set up border stones displaying the Austrian eagle and started to tax the inhabitants according to Austrian laws. Prince Henry of Prussia, Frederick's younger brother, visited Catherine in St. Petersburg at the time. Catherine smiled and said "Why should others not do the same?" With that, the ax fell, and Frederick did not even have to say one word. On August 5, 1772 the three powers, Russia , Austria and Prussia, signed the contract, which allotted certain regions of Poland to the three nations. Poland was now smaller to be sure, but it still was very large, reaching from Posen to Kiev and from Riga to Czernowitz. In all it lost about five million people, of which the largest share went to Austria and the smallest to Prussia. The population gained by each of the three nations was as follows: Austria - 1,500000, Russia- 340000, Prussia- 160000. Frederick received West Prussia, but without the cities of Danzig and Thorun. This territory linked central Prussia with Brandenburg. The rest of Europe paid no attention. Frederick wrote in his memoirs "My position was of a delicate nature. Through my alliance with Russia I was obliged to furnish troops in case of a war with Austria. I either fulfilled my obligations, or I remained a neutral bystander, which was to me the most dangerous position to take. An Alliance between Russia and Austria could have led to total isolation of Prussia, which would have been a mistake I was not willing to make." He also wrote "The hostilities between Turkey and Russia changed the whole political system in Europe. I would have been very clumsy or very stupid not to take advantage of the situation for my state. I was able to compensate Prussia for the terrible losses of the war, and to unite Polish Prussia with my old provinces."
Seventy years before the pest had ravaged Poland, and many towns had been burned. Frederick found on his inspection tours that nothing much had been done to rebuild the towns. In the next six years Prussia would make vast improvements and many buildings were erected in the newly acquired region.