A new law has pardoned more than 300 servicemen executed for breaches of discipline during World War I.
Private Harry Farr was among those executed
The measure is included within the Armed Forces Act which gained Royal Assent on Wednesday.
The government says the law, which was included when the bill was passed through the Lords, is intended to remove the dishonour of execution.
It does not cancel sentences or convictions and does not apply to servicemen convicted of murder.
The group pardon was announced in August and was approved without a vote as part of the Armed Forces Bill. It will also have to be approved by MPs.
Defence Secretary Des Browne said: "This is not about rewriting history. I do not want to second guess decisions made by the commanders at the time.
"I believe it is better to acknowledge that injustices were clearly done in some cases - even if we cannot say which - and to acknowledge that all these men were victims of war.
"I hope that pardoning these men will finally remove the stigma with which their families have lived for years."
In a Commons debate on Tuesday night, Labour's Andrew Mackinlay (Thurrock), who led the campaign, told MPs: "This is my proudest moment to support this amendment."
Tory Lord Tebbit had criticised the move, saying last month that some of those getting pardons would not deserve them.
It is thought 306 British soldiers were shot for cowardice, desertion or other offences during the 1914-1918 war.
They included Private Harry Farr from Kensington, west London, who was 25 years old when he was shot at dawn in 1916 after refusing to return to the front line.
His family had always argued that the soldier, of the 1st Battalion West Yorkshire Regiment, was suffering from shell shock at the time.
The pardons mean the end of a legal campaign spanning 15 years by Pte Farr's daughter Gertrude Harris, 93, from Harrow Weald, and his granddaughter Janet Booth, 64, from Farnham, Surrey.
Mrs Booth said: "This is just wonderful, not only for my grandfather who was shot for cowardice during the First World War, but also for the families of all the other men who fought so bravely only to be killed by their own side.
"On behalf of the family, we would like to say a huge thank you to everyone who has helped in the fight and never stopped believing in the rights of these men to be remembered for their bravery."
Their lawyer John Dickinson, of Irwin Mitchell solicitors, said: "Private Farr had no fair trial and was shot the morning after his sentencing by a summary court.
"Today is a great day for brave men and their families who deserve to know that their relatives were not cowards."