All British military personnel deployed to Iraq or Afghanistan are to be given the chance to store their DNA in a secure armed forces repository from later this year.

However, the voluntary samples, to be used to identify bodies or body parts in the event of catastrophic accidents or combat deaths where remains are unrecognisable, will not be passed on to the National DNA Database or used to help police with criminal inquiries, the Ministry of Defence confirmed yesterday.

All RAF and Army Air Corps crew have had the opportunity to store "reference samples" since 1999 because of the frequent problems of positively identifying the casualties from aircraft crashes.

Soldiers, Royal Marines and sailors will now be given the same option, which will gradually be extended to new recruits from all services to try and eliminate the distressing "unknown soldier" dilemma.

At the moment, aircrew have samples taken by a blood spot. The new system will involve a cheek swab from those who give their consent.

The MoD said yesterday: "The swabs will be on offer either before deployment or during regular dental check-ups. The samples will not be processed immediately, but stored in secure cabinets in rooms with restricted access.

"They will only be analysed in the event of an individual's death or suspected death to quickly verify identity and thereby reduce the distress for families waiting to know the fate of their loved ones."

Samples held by the military will only be released if requested by a coroner and only for the purpose of post-mortem identification. This has already been done on two occasions in the past eight years to allow positive identification of six killed air servicemen.

A spokesman for the MoD said: "The purpose of DNA sampling and matching is to minimise the distress, intrusion and grief to service families.

"At the moment, collecting samples from personal effects or from other family members can prolong the identification process and be traumatic for those involved."

One Afghanistan veteran, approached by The Herald, said: "When this idea was first floated, a lot of the guys were deeply suspicious of Big Brother motives.

"Once they've seen action and what modern weapons can do to a human body, they tend to change their minds.

"It makes sense. There are graveyards all over the world with monuments to unknown warriors. That's not right. Families need closure."