A 21-gun salute is the most commonly recognized of the customary gun salutes that are performed by the firing of cannons or artillery as a military honor. As naval customs evolved, 21 guns came to be fired for heads of state, or in exceptional circumstances for heads of government, with the number decreasing with the rank of the recipient of the honor. While the 21-gun salute is the most commonly recognized, the number of rounds fired in any given salute will vary depending on the conditions. Circumstances affecting these variations include the particular occasion and, in the case of military and state funerals, the branch of service, and rank (or office) of the person to whom honors are being rendered.