The uprising of Estonians in the Duchy of Estonia purged the country of Germans. The Livonian Order hastened to aid.
The Danes sold Rakvere Castle to the Livonian Order. On 23 April 1343, an uprising of Estonians began in the Duchy of Estonia (Harju-Viru). The uprising also spread to western Estonia and Saaremaa Island. As the King of Denmark was not able to suppress the uprising on his own, he had no choice but to accept the help of the Livonian Order State.
On 16 May 1343, the vassals of Harju and Viru placed themselves under the protection of the Order. After crushing the army of Estonians at the battle of Sõjamäe (14th of May), the Order’s army suppressed the uprising and seized major castles in the Duchy of Estonia, including Rakvere Castle. In 1346, the Danish King Valdemar IV sold the Duchy of Estonia for 19,000 silver marks (~4.4 tonnes of silver) to the Teutonic Order, which in its turn passed it on to the Livonian Order.
It is less known that the Teutonic Order also gave 6,000 silver marks (~1.6 tonnes of silver) to the margrave of Brandenburg who received it as compensation for losing the Duchy of Estonia which had been given him as a dowry by the King of Denmark.