Peace of Travendal

The Peace of Travendal was a peace treaty concluded at the outset of the Great Northern War on 18 August 1700 between the Swedish Empire, Denmark–Norway and Holstein-Gottorp in Traventhal. Denmark had to return Holstein-Gottorp to its duke, a Swedish ally, and to leave the anti-Swedish alliance. The Danes only reentered the war after Sweden's major defeat in the Battle of Poltava, 1709, having used the time to reform their army. The treaty was guaranteed by France, the Holy Roman Empire, the United Provinces (Netherlands) and Great Britain.
Background.
In 1698 and 1699, Peter the Great of Russia, Augustus II the Strong of Saxony and Poland–Lithuania, as well as Christian V and his successor Frederick IV of Denmark-Norway agreed on a three-front assault on the Swedish Empire, where minor Charles XII had ascended the throne in 1697. Holstein-Gottorp, just south of Denmark, was tied to Sweden by the marriage of duke Frederick IV to Hedvig Sophia, daughter of Charles XI of Sweden, in 1698. Danish forces entered Holstein-Gottorp in March 1700 and besieged the fortress of Tönning, while August the Strong was advancing through Swedish Livonia. 
In the meantime, Sweden had negotiated the support of the Maritime Powers, the Netherlands and the United Kingdom, against Danish assaults on Holstein-Gottorp. Such assaults violated the Altona convention of 1689, of which the Maritime Powers were the guarantors. In addition, the Maritime Powers prepared for the emerging War of the Spanish Succession and therefore opposed an additional war in the Baltic Sea. Aided by the Dutch and British navies, a Swedish fleet deployed a 10,000 strong army near Copenhagen. Caught by surprise and unable to defend his capital, Frederik IV of Denmark-Norway had to make peace. As soon as the end of the war was in sight, the Maritime Powers withdrew their vessels and made it clear that they preferred a peace at once and had no interest in Sweden crushing and annexing Denmark.
The treaty.
In Travendal, Denmark left the Great Northern War by obliging herself to not engage in future armed conflicts with Sweden. In paragraph XIII, the king of Denmark and Norway in his own name and the name of his successors promises to neither engage in hostilities with Sweden nor ally with or in any way aid Sweden's enemies, and adhere to all earlier Dano-Swedish treaties. The duke of Holstein-Gottorp's sovereignty was restored, and the treaty detailed the conditions under which armies and fortresses were to be maintained in the area. It was further agreed that Holstein-Gottorp be financially compensated by Denmark for the war costs, resulting in the subsequent payment of 260,000 Reichstalers.
Paragraph XIV mentions France, the Holy Roman Emperor, the dukes of the Holy Roman Empire, and the guarantors of the Altona convention as guarantors of the treaty. The guarantees of the United Provinces and the United Kingdom for the treaty were reconfirmed in a convention signed by the aforementioned parties after Queen Anne's succession in Great Britain, 1702.
Consequences.
By the time of Travendal, Augustus II the Strong's campaign in Swedish Livonia had not produced satisfactory results. Though Dünamünde was captured and renamed "Augustusburg", he failed to take Riga or gain the support of the local nobility. Furthermore, Russia's forces had not yet entered the Great Northern War, as they were bound by the Russo-Turkish War until the Peace of Constantinople set them free in the summer. Thus, August's reaction to Travendal was to enter negotiations with France and Brandenburg-Prussia and ask them to mediate a truce with Sweden. Charles XII of Sweden, however, rejected the offer, refusing to enter negotiations as long as Saxon forces were in Livonia. Peter the Great took a more indifferent stance, and marched his troops towards Swedish Ingria as agreed on in the Treaty of Preobrazhenskoye.
As soon as Denmark was out of the war, Charles XII speedily embarked his armies and headed from Denmark to his Baltic dominions. Russian forces entered Ingria and laid siege to Narva in October, while August the Strong was preparing winter quarters in Livonia. On 30 November, Charles XII's army relieved Narva before turning south sweeping August the Strong's forces out of Livonia, pursuing and decisively defeating them at Kliszow and Fraustadt during the following years, forcing August to drop out of the war in the Treaty of Altranstädt in 1706. The tide turned only in 1709, when Charles XII's last remaining adversary Peter the Great was able to crush his army at Poltava and exile the Swedish king to Bender in the Ottoman Empire. Denmark and Saxony then abandoned Travendal and Altranstädt and entered the war again.
Frederik IV of Denmark used the peace period to reform the Danish army. Instead of relying on mercenaries, the army was now raised from peasants distributed by Danish landowners. The mercenary force was kept and fought on the Maritime Powers' side in the War of the Spanish Succession against "roi soleil" Louis XIV of France. Frederik also implemented civil reforms such as the abolishment of serfdom. When he re-entered the Great Northern War, the mercenaries were still fighting France, but were returned to participate in the war in 1713.