A 21 gun salute is a military honor which is accorded to someone such as a visiting head of state or an object such as a national flag. Gun salutes have been used for ceremonial purposes since firearms were invented, and the precise numbers of guns or other artillery weapons fired tends to vary, depending on the nation and the level of honor which the salute is designed to imply. One famous form of the 21 gun salute is in the three volley salute, a gun salute which accompanies high-ranking military burials.
The history of the 21 gun salute is actually far older than the gun itself. Since ancient times, people with peaceful intentions have approached with their weapons held in a way which disables them. For example, people carrying spears might drag them along the ground. The disability of the weapon implies a genuine peaceful intention, and also an honor, as someone with a disabled weapon is in the power of someone with a functional weapon.
The earliest form of the gun salute was a naval convention. Many ships would fire their guns when they approached a port, to alert the residents to their approach and also to convey peaceful intentions, since a painstaking reloading process would have been required to get the guns ready to be fired again. Over time, these gun salutes were deemed celebratory as well as functional, and the idea of firing weapons to honor someone and to celebrate an event also began to appear on land.
At funerals, weddings, and ceremonies held to celebrate someone's change in status, a gun salute is a very formal honor, and the number of guns is dictated by the rank of the person involved and by the nation. In the United States, for example, gun salutes have fluctuated, at one point based on the number of states in the Union, for example, with the current formal number being set at 21. A full 21 gun salute is reserved for the President of the United States and certain visiting dignitaries, although a President may be honored with a different number of guns when he or she travels abroad.
In the United States, a 21 gun salute is fired at noon on Memorial Day to commemorate American war dead, and it is also fired at noon on the day of a death of a President or former President. Presidents are also entitled to a 21 gun salute when they are buried. On the Fourth of July, a whopping 50 gun salute is fired to honor all 50 states in the Union, and gun salutes of varying numbers may be fired to celebrate individual state constitutions and other major political events around the United States.