New laws are being brought in to allow inquests into the deaths of Scottish military personnel overseas to be held in Scotland.
Until now, bereaved Scottish families have been forced to travel long distances to attend such hearings.
But a legal change means from 24 September inquiries will be able to take place north of the border.
The move was welcomed by both the Scottish justice secretary and lord advocate.
The change will allow the Chief Coroner of England and Wales, Judge Peter Thornton QC, to recommend an investigation be transferred to Scotland.
Westminster Justice Minister Helen Grant described the changes to the Coroners and Justice Act 2009 as a "common-sense approach" that would help the relatives of men and women who had "made the ultimate sacrifice".
Until this point, there has been no legislative basis for the lord advocate to investigate deaths outside Scotland.
This has meant the bodies of Scottish servicemen and women killed overseas have been returned to England so a coroner there could investigate the circumstances of their death.
The position led to calls for a change in the law so bereaved families would no longer need to travel south for inquests.
These calls gathered pace after 14 servicemen died when their Nimrod plane from RAF Kinloss in Moray exploded over Afghanistan in September 2006.
The majority of those killed were based in Scotland but the inquest was held in England.
Angus Robertson, SNP MP for Moray, which takes in RAF Kinloss, welcomed the change.
He said: "This has always been about family members who deserve the best support and assistance after the deaths of a loved one.
"It was simply unacceptable that service families in Scotland had to travel so far and at great cost to inquiries in the south of England.
"There has been a desperate need for the coroner's service to be more responsive, and making these changes which will allow inquests to be held in Scotland will bring a real improvement for bereaved families, witnesses and the wider public."
Scottish Secretary Michael Moore said: "Our service personnel carry out an essential and brave job in the defence of our nation and we have a duty to support them and their families in every way possible.
"It is hugely tragic every time a member of our armed forces is killed abroad and this change to the law will help support bereaved families through an incredibly difficult process."
Scottish Justice Secretary Kenny MacAskill said it should always be remembered that family members of fallen servicemen and women needed compassion and support.
He added: "While it is right to have proper procedures in place to conduct investigations, asking family members to travel long distances from Scotland to the south of England to attend coroners' inquests can only add to the distress felt."
Lord Advocate Frank Mulholland also welcomed the introduction of the legislation.
Mr Mulholland said: "This will be a great help to families who have lost loved ones in the service of their country.
"The Scottish fatalities investigation unit is ready and able to deal with these cases sensitively when required."