By Ian Simpson

WASHINGTON (Reuters) - President Barack Obama on Tuesday awarded posthumous Medals of Honor to two soldiers from World War One, one an African American and the other a Jew, who arguably were denied the honor earlier because of discrimination.

The medals, the United States' highest military honor for valor, went to Sergeant William Shemin of Bayonne, New Jersey, and Private Henry Johnson, of Albany, New York, 97 years after they saved comrades on French battlefields.

"They both risked their own lives to save the lives of others," Obama said in the White House ceremony. "It's never too late to say 'thank you.'"

Johnson, a member of the all-black 369th Infantry Regiment, known as the "Harlem Hellfighters," and Private Needham Roberts fought off an attack by a raiding party of at least a dozen Germans while on night sentry duty on May 15, 1918.

Wounded and under heavy fire, Johnson forced the Germans to retreat and kept Roberts, who was badly wounded, from being taken prisoner, Obama said.

The Army's website for Johnson said he advanced armed only with a knife.

Command Sergeant Major Louis Wilson of the New York National Guard accepted the medal on Johnson’s behalf.

Shemin, a Jewish soldier who served with the 47th Infantry Regiment, 4th Infantry Division, repeatedly exposed himself to heavy fire to rescue wounded soldiers from Aug. 7 to Aug. 9, 1918. When officers and other non-commissioned officers became casualties, Shemin took command of his platoon until he was wounded on Aug. 9.

Two of Shemin's daughters, Elsie Shemin-Roth of Webster Grove, Missouri, and Ina Bass of Somers, New York, accepted the Medal of Honor on behalf of their father.

There have been concerns that discrimination prevented Johnson and Shemin from being awarded the Medal of Honor. Army policy kept black troops from fighting alongside white units, and the Harlem Hellfighters served beside French colonial troops.

France awarded Johnson and Shemin the Croix de Guerre with palm for their heroic actions in combat.

Obama said Johnson had been denied a Purple Heart medal despite being wounded 21 times and being so disabled he could not return to his pre-war job as a railway porter. He died in 1929.

Shemin received the Distinguished Service Cross, one step below the Medal of Honor, despite having been nominated for the highest honor. Shemin died in 1973.

(Additional reporting by Roberta Rampton; Editing by Doina Chiacu and Steve Orlofsky)