When minister Francis Bellamy published the American Pledge of Allegiance in Youth’s Companion in 1892, his colleague James Upham devised a salute to go along with it, snapping the heels together and extending the right arm toward the flag:
At a signal from the Principal the pupils, in ordered ranks, hands to the side, face the Flag. Another signal is given; every pupil gives the flag the military salute — right hand lifted, palm downward, to a line with the forehead and close to it. Standing thus, all repeat together, slowly, ‘I pledge allegiance to my Flag and the Republic for which it stands; one Nation indivisible, with Liberty and Justice for all.’ At the words, ‘to my Flag,’ the right hand is extended gracefully, palm upward, toward the Flag, and remains in this gesture till the end of the affirmation; whereupon all hands immediately drop to the side.
This worked fine until the 1920s, when Italian fascists and then German Nazis adopted similar salutes. Congress delicately changed the American salute to the hand-on-heart gesture in 1942.