By forming various organizations.
The European Union, for example, unites Europe (Minus Britain these days) under one banner, thus preventing fighting.
A more direct example is the North Atlantic Treaty Organization. NATO protects the "North Atlantic" and Europe from terrorists and invading countries by using the combined military strength of multiple nations.
1: Treaty of Paris
2. Cuban Rebellion
3. USS Maine Sinks
4. De Lome Letter
5. U.S declares war on Spain
6. U.S lands on Cuba
:D