A peace treaty is an agreement between two or more hostile parties, usually countries or governments, which formally ends a state of war between the parties. It is different from an armistice, which is an agreement to stop hostilities, or a surrender, in which an army agrees to give up arms, or a ceasefire or truce in which the parties may agree to temporarily or permanently stop fighting.
Elements of treaties
A treaty's content usually depends on the nature of the conflict being concluded. In the case of large conflicts between numerous parties there may be one international treaty covering all issues or separate treaties signed between each party.
There are many possible issues which may be included in a peace treaty. Some of these may be:
- Formal designation of borders.
- Processes for resolving future disputes
- Access to and apportioning of resources
- Status of refugees
- Status of POW
- Settling of existing debts
- Defining of unjust behavior
- The re-application of existing treaties
In modern times certain intractable conflict situations may first be brought to a ceasefire and are then dealt with via a peace process where a number of discrete steps are taken on each side to eventually reach the mutually desired goal of peace and the signing of a treaty. A peace treaty also is often not used to end a civil war, especially in cases of a failed secession, as it implies mutual recognition of statehood. In cases such as the American Civil War, it usually ends when the armies of the losing side surrender and the government collapse. By contrast, a successful secession or declaration of independence is often formalized by means of a peace treaty.
Role of the United Nations
Since its founding after World War II the United Nations has sought to act as a forum for resolution in matters of international conflict. A number of international treaties and obligations are involved in which member states seek to limit and control behavior during wartime. This has meant that the action of declaring war is very likely infrequent to be undertaken.
Peace treaty under the United Nations
Since the end of the Second World War, which had been more shocking than the First World War, the United Nations system has been established and Article 2, paragraph 4 - 9, of the UN Charter, has banned the use of military force.  The UN Charter allows only two exceptions: "military measures by UN Security Council resolutions" and "exercise of self-defense" in countries subjected to armed attacks in relation to the use of force by States. Under the current UN system, war is only triggered by the enforcement of military measures under UN Security Council resolutions, or the exercise of self-defense rights against illegal armed attacks. In other words, the use of the term 'war' itself is being abandoned in the current international law system. Therefore, if the use of military force arises, it is called 'international armed conflict' instead of 'war'. The fact that the current international law system avoids the use of the term war also avoids the conclusion of a peace treaty based on the existence of war.  A peace treaty was not signed after the end of the Iraq war in 2003, and only the UN Security Council Resolution 1483, adopted on May 22, 2003, stipulated the postwar Iraqi regime for the stability and security of Iraq exclusively. 
One of the UN roles in peace processes is to conduct post-conflict elections. Post-conflict elections on the whole are thought to have no effect, or even a negative effect, on peace after civil war. However, when peace agreements transform rebel groups into political parties, the effect on peace is positive, specifically if international interveners use these moments of power distribution to hold the former combatants to the terms of their peace agreement.
Historic Peace Treaties
Probably the earliest recorded peace treaty, although rarely mentioned or remembered, was between the Hittite Empire and the Hayasa-Azzi confederation, circa 1350 BC. More famously, one of the earliest recorded peace treaties was concluded between the Hittite and Egyptian empires after the ca.1274 BC Battle of Kadesh (see Egyptian-Hittite peace treaty). The battle took place in what is modern-day Syria, the entire Levant being at that time contested between the two empires. After an extremely costly four-day battle, in which neither side gained a substantial advantage, both sides claimed victory. The lack of resolution led to further conflict between Egypt and the Hittites, with Ramesses II capturing the city of Kadesh and Amurru in his 8th year as king. However, the prospect of further protracted conflict between the two states eventually persuaded both their rulers, Hatusiliš III and Ramesses, to end their dispute and sign a peace treaty. Neither side could afford the possibility of a longer conflict since they were threatened by other enemies: Egypt was faced with the task of defending her long western border with Libya against the incursion of Libyan tribesmen by building a chain of fortresses stretching from Mersa Matruh to Rakotis, while the Hittites faced a more formidable threat in the form of the Assyrian Empire, which "had conquered Hanigalbat, the heartland of Mitanni, between the Tigris and the Euphrates" rivers that had previously been a Hittite vassal state.
The peace treaty was recorded in two versions, one in Egyptian hieroglyphs, and the other in Akkadian using cuneiform script; both versions survive. Such dual-language recording is common to many subsequent treaties. This treaty differs from others, however, in that the two language versions are worded differently. Although the majority of the text is identical, the Hittite version claims that the Egyptians came suing for peace, while the Egyptian version claims the reverse. The treaty was given to the Egyptians in the form of a silver plaque, and this "pocket-book" version was taken back to Egypt and carved into the Temple of Karnak.
The Treaty was concluded between Ramesses II and Hatusiliš III in Year 21 of Ramesses' reign (c.1258 BC). Its eighteen articles call for peace between Egypt and Hatti and then proceed to maintain that their respective gods also demand peace. It contains many elements found in more modern treaties, but is more far-reaching than later treaties' simple declaration of the end of hostilities. It also contains a mutual-assistance pact in the event that one of the empires should be attacked by a third party, or in the event of internal strife. There are articles pertaining to the forced repatriation of refugees and provisions that they should not be harmed; this might be thought of as the first extradition treaty. There are also threats of retribution, should the treaty be broken.
This treaty is considered of such importance in the field of international relations that a reproduction of it hangs in the United Nations headquarters.
Famous examples include the Treaty of Paris (1815), signed after Napoleon's defeat at the Battle of Waterloo, and the Treaty of Versailles, formally ending the First World War conflict between Germany and the Western Allies. This is held to have ended World War I completely, but in fact that did not happen until the Allies concluded peace with the Ottoman Empire in 1920 through the Treaty of Sèvres. The Versailles treaty is possibly the most notorious of peace treaties, in that it is "blamed" by many historians for the rise of National Socialism in Germany and the eventual outbreak of the Second World War in 1939. The costly reparations that Germany was forced to pay the victors, the fact that Germany had to accept sole responsibility for starting the war, and the harsh restrictions on German rearmament were all listed in the treaty and caused massive resentment in Germany. Whether the Treaty of Versailles can be blamed for starting another war or not, it shows the difficulties involved in making peace. It might be noted that no such conflict resulted from the more punitive settlement with the Ottomans.
Another famous example would be the series of peace treaties known as the Peace of Westphalia. It initiated modern diplomacy, involving the modern system of nation-states. Subsequent wars were no longer over religion, but rather revolved around issues of state. This allowed Catholic and Protestant powers to ally, leading to a number of major realignments.
The Korean War is an example of a war which was stopped by the 1953 Korean Armistice Agreement but it was not closed with a peace treaty. This means that the Korean War has never technically ended. Respecting the latest example of peace treaty, in order to end the Vietnam War, on January 27, 1973, the United States declared the peace treaty among the USA, North Vietnam, South Vietnam. It was signed with the name as 'Paris Peace Accords' 
- Ius gentium
- List of treaties
- Separate peace
- Peace Treaty on Korean Peninsula
- Uppsala Conflict Data Program provides a dataset of all comprehensive agreements, partial agreements or peace process agreements between actors in armed conflict between 1975-2007.
- Naraghi-Anderlini, Sanan (2007). "Peace Negotiations and Agreements" (PDF). Inclusive Security.
- Randall Lesaffer,“ Too Much History: from War as Sanction to the Sanctioning of War”, in Marc Weller (ed.), The Oxford Handbook of the Use of Force in International Law (Oxford: Oxford University Press, 2015), p.37.
- Mohammad Taghi Karoubi, Just or Unjust War?: International Law and Unilateral Use of Armed Force by States at the Turn of the 20th Century (Aldershot: Ashgate, 2004), p.103.
- """Is it necessary to sign the "Peace Agreement" on the Korean peninsula? pdf version - page 2 ~ 3 "" (in Korean). asaninst.org/. Retrieved 2017-08-23.
- Collier, Paul (2009). Wars, Guns, and Votes: Democracy in Dangerous Places3. New York: Harper Perennial.
- Flores, Thomas Edward; Nooruddin, Irfan (30 March 2012). "The Effect of Elections on Post-Conflict Peace and Reconstruction". Journal of Politics. 74 (2): 558–570. JSTOR 10.1017/s0022381611001733.
- Brancati, Dawn; Snyder, Jack (October 2013). "Time to Kill: The Impact of Election Timing and Sequencing on Post-Conflict Stability". Journal of Conflict Resolution. 57 (5): 822–853. doi:10.1177/0022002712449328.
- Matanock, Aila M. (Spring 2017). "Bullets for Ballots: Electoral Participation Provisions and Enduring Peace after Civil Conflict". International Security. 41 (4): 93–132. doi:10.1162/ISEC_a_00275.
- Matanock, Aila M. (2017). Electing Peace: From Civil Conflict to Political Participation. Cambridge: Cambridge University Press. ISBN 9781107189171.
- Nicolas Grimal, A History of Ancient Egypt, Blackwell Books: 1992, pp.256-257
- Grimal, op. cit., p.256
- Grimal, op. cit., p.257
- """Is it necessary to sign the "Peace Agreement" on the Korean peninsula? pdf version - page 8 ~ 9 "" (in Korean). asaninst.org/. Retrieved 2017-08-23.
- UN Peacemaker, United Nations Database of Peace Agreements
- Peace Agreement Access Tool (PA-X), 1990-2016
- United States Institute of Peace Digital Peace Agreements Collection
- Uppsala Conflict Data Program's Peace Agreement Dataset v. 2.0, 1975-2011
- The Paris Peace Treaty of 1783
- The peace treaties: comprising the league of nations covenant, digest of the German treaty, digest of the Austrian treaty, with annotations by the American mission at the peace conference; milestones on the road to victory indexed, authors Publicity Corporation, Continental National Bank. Publisher The Federal trade information service, 1919
- The Treaty of Versailles, 1919
- Peace Agreements Database at the Transitional Justice Institute