A victor gives no quarter when the victor shows no clemency or mercy and refuses to spare the life in return for the surrender at discretion (unconditional surrender) of a vanquished opponent. It is against modern international humanitarian law to declare that no quarter will be given.
In the past, during a siege it was accepted that if an enemy garrison was offered the chance to surrender on terms and did not accept those terms, then if the attacker subsequently captured members of the garrison, under the customary laws of war at that time, those defenders had surrender at the discretion of the attacker and the attacker could choose to either give them quarter or kill them.
In the past, in some circumstances, the opposing forces would signal their intention to give no quarter by using a flag, however the use of a red flag to signal no quarter does not appear to have been universal among combatants.
The term may originate from an order by the commander of a victorious army that they will not quarter (house) captured enemy combatants. Therefore, none can be taken prisoner and all enemy combatants must be killed. A second derivation, given equal prominence in the Oxford English Dictionary (OED), is that quarter (n.17) can mean "Relations with, or conduct towards, another" as in Shakespeare's Othello, Act II, scene iii, line 180, "Friends all ... In quarter, and in termes, like bride and groome". So "no quarter" may also mean refusal to enter into an agreement (relations) with an enemy attempting to surrender. The OED mentions a third possible derivation but says "The assertion of De Brieux (Origines ... de plusieurs façons de parler (1672) 16) that it arose in an agreement between the Dutch and Spanish, by which the ransom of an officer or private was to be a quarter of his pay, is at variance with the sense of the phrases to give or receive quarter."
International humanitarian law
Under international humanitarian law, "it is especially forbidden ... to declare that no quarter will be given". This was established under Article 23 (d) of the 1907 Hague Convention IV - The Laws and Customs of War on Land. Since a judgment on the law relating to war crimes and crimes against humanity at the Nuremberg Trials in October 1946, the 1907 Hague Convention, including the explicit prohibition to declare that no quarter will be given, are considered to be part of the customary laws of war and are binding on all parties in an international armed conflict.
By the 17th century, siege warfare was an exact art, the rules of which were so well understood that wagering on the outcome and duration of a siege became a popular craze; the then enormous sum of £200,000 was alleged to have been bet on the outcome of the Second Siege of Limerick in 1691. Professional honour demanded a defence, but if they surrendered when "a practicable breach" had been made, garrisons were given "quarter". They did so by "beating the chamade"; it generally meant retaining their weapons, and receiving a safe conduct to the nearest friendly territory. If a garrison continued their defence beyond this point, it did not apply, hence "No quarter"; the besiegers were then "permitted" to sack the town, and the garrison was often killed.
In some circumstances, the opposing forces would signal their intention to give no quarter by using a red flag, however the use of a red flag to signal no quarter does not appear to have been universal among combatants.
Black flags have been used to signify that quarter would be given if surrender was prompt; the best known example is the Jolly Roger used by pirates to intimidate a target crew into surrender. By promising quarter, pirates avoided costly and dangerous sea battles which might leave both ships crippled and dozens of critical crew dead or incapacitated.  Others include during the 1850 to 1864 Taiping Rebellion, as well as by irregular Confederate Army units in the US Civil War. At Tippermuir in 1644, Scots Covenanters used the battlecry "Jesus, and no quarter", signifying they would not take prisoners.
- Oxford English Dictionary: quarter, n. 18.a
- "quarter". Oxford English Dictionary (Online ed.). Oxford University Press. Retrieved 8 August 2020. (Subscription or participating institution membership required.) 18(a) derived from 16(a) "Place of residence, dwelling place; (usually in plural) rooms, barracks, lodgings, esp. those allocated to soldiers, or to staff in domestic service".
- "Convention (IV) respecting the Laws and Customs of War on Land and its annex: Regulations concerning the Laws and Customs of War on Land. The Hague, 18 October 1907". International Committee of the Red Cross. Retrieved July 16, 2013.
- Judgment: The Law Relating to War Crimes and Crimes Against Humanity in the Avalon Project archive at Yale Law School)
- Manning 2006, pp. 413-414.
- Afflerbach & Strachan 2012, pp. 159-160.
- Cordingly, p. 117. Cordingly cites only one source for pages 116–119 of his text: Calendar of State Papers, Colonial, America and West Indies, volumes 1719–20, no. 34.
- Nofi 1992, p. 51.
- Woodard, Colin (30 June 2008). The Republic of Pirates. Mariner Books. ISBN 015603462X.
- Williams 2001, p. 155.
- Afflerbach, Holger; Strachan, Hew, eds. (2012). How Fighting Ends: A History of Surrender. OUP. ISBN 0199693625.
- Manning, Roger (2006). An Apprenticeship in Arms: The Origins of the British Army 1585–1702. OUP. ISBN 0199261490.
- Nofi, Albert A. (1992). The Alamo and the Texas War of Independence, September 30, 1835 to April 21, 1836: Heroes, Myths, and History. Combined Books, Inc. ISBN 0-938289-10-1.
- Williams, RH (2001). Montrose: Cavalier in Mourning. House of Lochar. ISBN 978-1899863594.