President Obama awarded the Medal of Honor Tuesday to two World War I Army soldiers who may have been denied the top military honor in the past due to discrimination. 

"It's never too late to say thank you," Obama said. 

Obama posthumously recognized Sgt. William Shemin, a Jewish soldier, and Pvt. Henry Johnson, an African-American serviceman, for their heroism rescuing comrades on the battlefields of France nearly a century ago. 

"They both risked their own lives to save the lives of others," the president said. 

Shemin's two daughters, Elsie and Ina, received the award on behalf of their father. New York National Guard Command Sgt. Maj. Louis Wilson accepted the medal on Johnson's behalf. 

Shemin repeatedly dodged gunfire to pull wounded comrades to safety during three days of bloody battle. And Pvt. Henry Johnson rescued a wounded comrade from his all-black regiment while single-handedly fighting off a surprise German attack. 

The award comes after tireless efforts by advocates for the two men led Congress to pass an exemption from Medal of Honor rules specifying that heroic actions have to have taken place within five years to be considered. 

"It has taken a long time for Henry Johnson and William Shemin to receive the recognition they deserve and there are surely others whose heroism is still unacknowledged and uncelebrated," Obama said, adding that there is still work to do to ensure that the stories of all heroes are told. 

"The least we can do is to say we know who you are, we know what you did for us, we are forever grateful," he said. 

Elsie Shemin-Roth of suburban St. Louis worked for years to gather documents in support of the bid for her father. In the early 2000s, she learned of a law that reviewed the cases of Jews who may have been denied medals they earned in World War II and fought for passage of a law to provide similar review for Jewish World War I veterans. 

"This was anti-Semitism, no question about it," Shemin-Roth, who is in her 80s, said in an interview in December when Congress passed the exemption for her father, who died in 1973. "Now a wrong has been made right and all is forgiven." 

Johnson supporters pushed for the Medal of Honor for decades -- with New York Sen. Chuck Schumer taking up the case. He was initially rebuffed for lack of documentation, but his staff picked up the case again years later when a trove of military records became available online. This included a communique from Gen. John Pershing describing Johnson's brave acts after coming under attack by at least 12 German soldiers while on night sentry duty on May 15, 1918. 

"While under intense enemy fire and despite receiving significant wounds, Johnson mounted a brave retaliation resulting in several enemy casualties," the White House said in a statement. "When his fellow soldier was badly wounded, Private Johnson prevented him from being taken prisoner by German forces. Private Johnson exposed himself to grave danger by advancing from his position to engage an enemy soldier in hand-to-hand combat. Displaying great courage, Private Johnson held back the enemy force until they retreated." 

Johnson, who worked as a train station porter in Albany, enlisted in the 369th, a New York National Guard unit based in Manhattan. The "Harlem Hellfighters," as the unit became known, served under French command because U.S. armed forces were segregated at the time. 

Hobbled by his wartime injuries, Johnson died a destitute alcoholic at age 32 at a veterans hospital in Illinois in 1929. 

Shemin was 19 when his platoon was involved in a bloody fight. "Sergeant Shemin left the cover of his platoon's trench and crossed open space, repeatedly exposing himself to heavy machine gun and rifle fire to rescue the wounded," the White House announcement said. 

The young sergeant took shrapnel but survived. He led the platoon out of harm's way for the next three days, until a German bullet pierced his helmet and lodged behind his left ear. Shemin was hospitalized for three months and was left partly deaf. Shrapnel wounds eventually left him barely able to walk, although he earned a degree from Syracuse University and started a nursery business in the Bronx.