A neutral country is a state which is either neutral towards belligerents in a specific war, or holds itself as permanently neutral in all future conflicts (including avoiding entering into military alliances such as NATO). The exact nature of neutrality can differ between the interpretations of various countries. Some, such as Costa Rica have demilitarized whereas Switzerland holds to 'armed neutrality' in which is deters aggression with a sizeable military while barring itself from foreign deployment. Not all neutral countries avoid any foreign deployment or alliances however, as Ireland shows with active UN peacekeeping and a political alliance within the European Union.
Belligerents may not invade neutral territory, and a neutral power's resisting any such attempt does not compromise its neutrality.
A neutral power must intern belligerent troops who reach its territory, but not escaped prisoners of war. Belligerent armies may not recruit neutral citizens, but they may go abroad to enlist. Belligerent armies' personnel and material may not be transported across neutral territory, but the wounded may be. A neutral power may supply communication facilities to belligerents, but not war material, although it need not prevent export of such material.
Belligerent naval vessels may use neutral ports for a maximum of 24 hours, though neutrals may impose different restrictions. Exceptions are to make repairs—only the minimum necessary to put back to sea—or if an opposing belligerent's vessel is already in port, in which case it must have a 24-hour head start. A prize ship captured by a belligerent in the territorial waters of a neutral power must be surrendered by the belligerent to the neutral, which must intern its crew.
Neutrality has been recognised in different ways, and sometimes involves a formal guarantor. For example, Austria has its neutrality guaranteed by its four former occupying powers, Switzerland by the signatories of the Congress of Vienna and Finland by the Soviet Union. The form or recognition varies, often by bilateral treaty (Finland), multilateral treaty (Austria) or a UN declaration (Turkmenistan). These treaties can in some ways be forced on a country (Austria's neutrality was insisted upon by the Soviet Union) but in other cases it is an active policy of the country concerned to respond to a geopolitical situation (Ireland in the Second World War).