It originated as Decoration Day in May 1868, an annual commemoration in which the graves of the war dead were decorated with flowers.

At the time, Maj. Gen. John A. Logan, who served in the Mexican-American War and the Civil War, declared that Decoration Day should be observed in May because flowers would be in bloom all across the country.

Watch: Trump attends Memorial Day ceremony at Arlington National Cemetery »

As decades passed, it became known as Memorial Day, and in 1971 a federal law took effect declaring Memorial Day a national holiday to be held on the last Monday of May, observing all military personnel who have died in American wars.

Here are the total battle deaths from America’s wars, according to the Department of Veterans Affairs. (These numbers do not include those who died in theater but not in battle.)

4,435

On April 19, 1775, the first engagement of the war between the colonies and Britain erupted in Massachusetts, long a hotbed of rebellion, with the battles of Lexington and Concord. Two months later, the Second Continental Congress representing the 13 colonies tasked George Washington to be commander of the Continental Army. In 1789 he became the first president of the United States.

British troops fire on Continental Army soldiers during a Patriots' Day reenactment of the battles of Lexington and Concord, in Lexington, Mass. (Keith Viglione/Associated Press)

2,260

The causes were complex, but at its core, the war was about Britain preventing the United States from trading with foreign countries. Also, Britain did not want the young United States to move into western territories, so it provided weapons to Native Americans on the British side. On June 18, 1812, President James Madison signed the declaration of war for the conflict now best remembered for the sacking of Washington, D.C., and for inspiring Francis Scott Key to write “The Star-Spangled Banner.”

An artist's interpretation of the attack on Washington, D.C., by British troops during the War of 1812. (Getty Images)

1,000

European settlers and Native Americans had battled each other long before the United States was founded, but those conflicts took on new urgency as the country expanded westward in the 1800s. The native populations were massacred, driven from their lands and compelled to give up their language and culture. The total dead is an estimate by the Department of Veterans Affairs.

Little Bighorn Battlefield National Monument preserves the site of the June 25-26, 1876, Battle of the Little Bighorn, near Crow Agency, Mont. (Barbara Davidson/Los Angeles Times)

1,733

The war was the first U.S. conflict fought primarily on foreign soil and carried out the expansionist vision of President James K. Polk. In the end, Mexico lost large portions of its territory, which today include all or parts of Arizona, California, New Mexico, Nevada and Utah. The war also served as a training ground for many soldiers — including Robert E. Lee and Ulysses S. Grant — who would fight against each other in the Civil War.

An 1828 map by William Lizars shows the vast territory Mexico held after independence. Mexico would lose much of its northern territory in the war with the United States. (Marcos Ramirez)

140,414 (Union)

74,524 (Confederate)

The tally of battlefield deaths, awful as it is, offers only a glimpse of the suffering and sacrifice during the war that put down the rebellion of 11 Confederate states and ended slavery. Thousands of soldiers, from both North and South, died from disease or other causes. Among Union forces, there were 224,097 deaths in theater but not in battle. For the Confederacy, the total was 59,297.

The carnage of the Battle of Antietam, the bloodiest one-day battle of the Civil War, near Sharpsburg, Md., was captured in this Sept. 17, 1862, photograph. (Mathew B. Brady file )

385

The war resulted from conflicts between Spain and the United States and, eventually, ended colonial rule by Spaniards in the Americas. The war also extended the United States’ global reach with the acquisition of territories in Latin America and the Pacific. The war would long be remembered for the cry, “Remember the Maine!” — after a U.S. naval ship that exploded in Havana Harbor — and for the attack on San Juan Hill in Cuba that included future President Theodore Roosevelt.

Albert Edmund Lord III portrays buffalo soldier Edward Lee Baker Jr., who received the Medal of Honor and was a captain in the 10th U.S. Cavalry during the Spanish-American War. (Allen J. Schaben/Los Angeles Times)

53,402

After remaining neutral in the war for almost three years, the United States entered on April 6, 1917. At the time, many Americans shared the view of President Woodrow Wilson and were reluctant to enter the war. But, citing increasing German aggression, Wilson asked Congress to approve a declaration of war to enter “the war to end all wars.”

Army Gen. John Joseph "Black Jack" Pershing, center, led the American Expeditionary Forces in World War I. (Getty images)

291,557

For two years, the United States remained neutral in the war until Japan’s surprise attack on Pearl Harbor on Dec. 7, 1941. Within days the U.S. was at war as well with the other Axis powers, Germany and Italy. It would become America’s bloodiest war. A total of 670,846 service members suffered nonmortal wounds.

Gen. Dwight D. Eisenhower meets with Army paratroopers from the 101st Division in England on June 5, 1944, a day before the D-day invasion at Normandy, France. (National Archives)

33,739

In June 1950, communist North Korea initiated a surprise attack on South Korea. The United States and other nations came to the South’s aid in what President Harry S. Truman called a “police action.” The war was seen as key to preventing the spread of communism. Though an armistice was signed to halt hostilities, a peace treaty to formally end the war never was.

U.S. Marines, fighting their way from the communist encirclement at Chosin to Hungnam, rest in the snow in December 1950, a few months into the Korean War. (Associated Press)

47,434

In an effort to prevent communist North Vietnam from taking over South Vietnam, the United States deployed nearly 3.4 million troops to Southeast Asia. The war, America’s longest up to that time, forever changed American politics and culture as public opinion turned against the conflict. In addition to those killed in battle, there were 10,786 deaths in theater.

Army Spc. Nelson A. Parker calls for air power support as a U.S. patrol is surrounded by Viet Cong forces in the jungle 20 miles north of Saigon on Feb. 15, 1965. (Associated Press)

148

On Jan. 16, 1991, President George H.W. Bush announced the operation intended to oust occupying Iraqi forces from Kuwait, which Iraq had invaded and annexed months earlier. Iraqi forces were quickly overwhelmed by American firepower.

A destroyed Iraqi tank is shown near a series of oil well fires in the aftermath of the Persian Gulf War in this March 9, 1991, photo in northern Kuwait. (Associated Press)

6,915

Shortly after the Sept. 11, 2001, terrorist attacks, President George W. Bush launched what has become known as the “war on terror.” This led to military action in Afghanistan and the second invasion of Iraq, which ultimately toppled dictator Saddam Hussein. To this day, American troops are fighting against extremist groups in Iraq and Afghanistan. The cumulative death total figures are according to icasualties.org, a website dedicated to keeping detailed documents of fallen service members fighting in Iraq and Afghanistan.

U.S. troops and Iraqi police officers stand guard in Mosul, Iraq, in 2003. (Maya Alleruzzo/Associated Press)

CALIFORNIA'S WAR DEAD: Read tributes to Americans who died in Iraq and Afghanistan »