VIENNA — Austria’s president apologized Friday for his country’s postwar treatment of deserters from Hitler’s army as traitors, at the unveiling of a memorial honoring those who fled military duty rather than serve under the Nazi regime.

The ceremony in Vienna was also attended by municipal dignitaries as well as some of those who deserted from the Wehrmacht — and suffered indignities for decades. All are in their late 80s or older, including Richard Wadani, who has lobbied for more than a decade for the memorial.

He called the unveiling a “happy occasion.”

Speaking earlier, President Heinz Fischer criticized the indignities surviving deserters have had to suffer over the past decades. Fischer said labeling them as traitors is “something for which one has to apologize and shame himself.”

The stone monument, just steps away from Fischer’s offices, is the first of its kind in the Austrian capital. Steps lead up to a large “X” that stands for the tens of thousands of deserters executed under Hitler.

Germany has long recognized that deserters from Hitler’s Wehrmacht deserved praise. But Austria passed a law only five years ago that officially rehabilitates them, in attempts to counter lingering perceptions within the older generation that they were turncoats.

That move, and others since, reflect official acceptance that Austria was a perpetrator of Nazi atrocities rather than a victim.

Nearly all Austrians voted for annexation of their country by Hitler’s Germany in 1938 and many of the Fuehrer’s henchmen were Austrians. But for decades, the country presented itself both at home and to the world as a target of Nazi aggression.