Diplomacy is the process by which states, or other international organizations, communicate with each other. The functions of diplomacy include communication, negotiation, image management and policy implementation. The goal of diplomacy is to solve issues through negotiations and other peaceful means rather than war. Diplomacy has a long history, beginning with treaties between cities in Mesopotamia (now Iraq) around 2850 B.C.E. Diplomacy grew and diversified in the medieval and modern periods as world religions, ideologies and empires emerged.
The 1961 Vienna Convention on Diplomatic Relations lays down rules that guarantee the personal inviolability of a diplomat and his or her property. In case of a breach, a diplomat can be declared persona non grata and sent home. Diplomatic missions can also be closed if a country is hostile or in war.
In peacetime, diplomacy is often a matter of persuading the other party to compromise in a dispute. This is called bargaining or mediation, and outsiders are sometimes used to help with the process. For example, Martti Ahtisaari helped Namibia negotiate its independence from South Africa.
Diplomacy is also about managing the complex relationship between a state and its neighbors. These relationships are often strained because of natural differences and the legacy of colonialism or feudalism. In this case, diplomacy is a way to maintain a balance of power and avoid a conflict that could have wider consequences for the entire region. It is not always successful, however, and in cases where diplomacy fails, war may break out.