CAMP PENDLETON, CALIF. — A Texas couple has adopted a bomb-sniffing dog that was with their Marine son when he was killed in Afghanistan.

The parents of Staff Sgt. Christopher Diaz adopted Dino after the 6-year-old Belgian malinois was discharged from active duty in an emotional ceremony at Camp Pendleton Saturday.

Diaz, 27, was Dino’s handler when he killed in September 2011 while rushing to help a wounded Marine during a raid in Helmand province.

After his death, Salvador Diaz asked to adopt his son’s constant companion.

The Los Angeles Times said the law permits such an adoption if it will help a family with the grieving process. The adoption went through after the Marine Corps received approval from the secretary of the Navy.

Dino had to pass a test developed by military dog trainers to ensure he didn’t suffer the canine equivalent of post-traumatic stress disorder after his combat experience.

The test showed Dino has the right temperament to be adopted, said Rich Landgrebe, operations manager for the Marine working-dog program.

Diaz’s mother said Dino will have a large backyard and a swimming pool in his new home in El Paso.