The so-called Roman salute began with a French painting, not ancient Rome
No Roman sculpture shows a stiff raised arm, and no surviving Roman text describes one. Historians trace the gesture to Jacques-Louis David's 1784 canvas Oath of the Horatii, from which it passed through stage epics and Italian silent films before Mussolini's Fascists and then Hitler's party claimed it as an ancient tradition.
After David, French neoclassical artists kept linking the raised arm with Rome. It turned up in the 1899 American stage version of Ben-Hur and its 1907 film, then in Italian silent cinema, notably Cabiria in 1914, whose script drew on the nationalist poet Gabriele D'Annunzio. He used the salute while occupying Fiume from 1919 to 1920, and Mussolini's party began enforcing it in the early 1920s. Separately, Americans had performed a look-alike gesture with the Pledge of Allegiance since Francis Bellamy revised it in 1892, until a hand over the heart replaced it in 1942.
Some Nazis were greeting Hitler this way by late 1923, and in 1926 it became compulsory for party members. Critics inside the movement called it un-Germanic mimicry of Italy, so in 1928 Rudolf Hess wrote an article claiming Germans had used it back in 1921. The word Heil had its own lineage: Hitler borrowed it, along with the title Führer, from the Austrian pan-German agitator Georg von Schönerer.
A decree of 13 July 1933 obliged every public employee to give the greeting, and people adopted it widely to avoid looking disloyal. Those unable to lift the right arm were told to use the left. Prisoners lost the right to perform it, and Jews were barred by 1937. Special courts punished refusal; Jehovah's Witnesses who declined were arrested and their children removed from school, and a 1934 police memo even ordered monkeys trained to salute by travelling performers to be destroyed.
Soldiers kept their traditional military salute until the failed bomb plot of 20 July 1944. By March 1945, at a war memorial near Hitler's Alpine retreat, a call for a Sieg Heil met total silence. Germany, Austria and Slovakia now outlaw the gesture, with Germany exempting mockery.
Source: Nazi salute