Ultimatum

 
An ultimatum (; ) is a demand whose fulfillment is requested in a specified period of time and which is backed up by a threat to be followed through in case of noncompliance (open loop). An ultimatum is generally the final demand in a series of requests. As such, the time allotted is usually short, and the request is understood not to be open to further negotiation. The threat which backs up the ultimatum can vary depending on the demand in question and on the other circumstances.
The word is used in diplomacy to signify the final terms submitted by one of the parties in negotiation for settlement of any subject of disagreement. It is accompanied by an intimation as to how refusal will be regarded. English diplomacy has devised the adroit reservation that refusal will be regarded as an "unfriendly act", a phrase which serves as a warning that the consequences of the rupture of negotiations will be considered from the point of view of forcing a settlement. This opens up a variety of possibilities, such as good offices, mediation, the appointment of a commission of inquiry, arbitration, reprisals, pacific blockade and war.
Deterrence.
Unlike the circumstances of an ultimatum, the scenario of deterrence is not bound by specific constraints of time, place, or action, and though a threat may be present, there is no formal guarantee of it being acted out. The scenario of nuclear deterrence (particularly the United States and the Soviet Union in the Cold War) is a good example of this concept: while both nations maintained a sizeable stockpile of nuclear weapons aimed at each other, the intent was to prevent open conflict (closed loop), and that no formal condition for initiating conflict was ever established, except in retaliation for the other side initiating an attack. In an ultimatum situation, such as during the Cuban Missile Crisis, either nation would threaten the use of nuclear weapons if certain demands/constraints were not met independent of that retaliatory capability that would have a fixed point of no return—compliance or warfare.
Requirement for military action.
An ultimatum may also serve to provide legitimacy for military action.
International law.
The Hague Convention relative to the Opening of Hostilities of 18 October 1907, provides as follows: 
As reasons for a declaration of war are necessarily in the nature of an ultimatum, the ultimatum may now be regarded as an indispensable formality precedent to the outbreak of hostilities.
Another Hague convention of the same date respecting the limitation of the employment of force for the recovery of contract debts provides as follows:
This undertaking, however, is not applicable when the debtor state refuses or neglects to reply to an offer of arbitration or, "after accepting the offer, renders the settlement of the compromis impossible, or, after the arbitration, fails to comply with the award."
Under this convention, in the cases to which it relates, the alternative of the ultimatum is ipso facto arbitration, and it is only when the conditions of the convention have been set at naught that other measures may be employed.
Subsequent to the United Nations Charter.
The United Nations Charter prohibits not only the use of force but also the threat of such use of force, but there is discussion on whether this prohibition applies only to (militarily) credible threats, whether (or when) the threat of the use of force in self-defence is permitted, and what actions (not necessarily accompanied by a verbal threat) can be considered a threat. 
The International Court of Justice has provided guidance on the legality of the use of threats: generally, if the use of force would be lawful, the threat of such use of force is also legal, and if the actual use of force is later found lawful, then the prior threat is also deemed lawful.
Advantages and disadvantages.
The actor that presents the other side with an ultimatum should be prepared to make good on the threat, for instance, initiate military action, if the other side does not comply with its demands. 
There are dangers if the threatened actor decides not to comply. On the one hand, if the actor presenting the ultimatum is not willing to go through with the threatened action, the other actor may "call their bluff" presenting a choice between a humiliating climb-down and an unwanted result (such as war). 
On the other hand, the opponent may take the ultimatum seriously and take pre-emptive action.
The ultimatum may encourage the opponent to remain firm so as not to be seen as weak.
One danger here is that the opponent may profess to accept the ultimatum, possibly with conditions, thus weakening the credibility of the issuer of the ultimatum.
Another danger is that the issuer may keep negotiating with the opponent when the requested period of time ends, further weakening the issuer's position.