Feb. 13, 2008 -- For Maj. Brian Dennis, the Semper Fidelis credo extends beyond his fellow Marines.

The story began with a few e-mails Dennis sent home about a dog his unit had met while looking for insurgents along the border of Iraq and Syria. If all goes as planned, it will end with a man and a dog he grew to love reunited on American soil.

A pack of desert dogs lived at one of the Iraqi border forts the unit patrolled. A wiry German shepherd-border collie mix was the alpha dog. Maj. Brian Dennis took a liking to the animal, whose nubby ears had been cut off as a puppy. Dennis, a 36-year-old Marine serving his second tour in Iraq, saw the dog about each time they visited the fort. He named him "Nubs."

At first, Nubs wouldn't give the Marine the time of day. "Nubs wouldn't have anything to do with him," Marsha Cargo, the Marine's mother, told ABC News. "Brian just kept working on him and working on him."

Over a period of months, the animal came around, befriending Dennis and his fellow Marines. During one visit, Dennis found Nubs with a deep puncture wound on his left side. He later learned the injury was inflicted by a screwdriver. He helped nurse the dog back to health.

The time came, however, for Dennis' unit to relocate 70 miles from Nubs' home fort. He may have wanted to take Nubs with the unit, Dennis wrote in one one of his e-mails home, but there were too many dogs to rescue and keeping a canine was against the rules. As always, Nubs sprinted alongside the Hummers as they pulled away for what Dennis assumed was the last time he would see the dog.

Two days later, Nubs wandered inexplicably in below-freezing conditions into Dennis' new camp, shocking the Marine unit. "I won't even address the gauntlet he had to run of dog packs, wolves, and God knows what else to get here," Dennis wrote. "When he arrived he looked like he'd just been through a war zone.

"Uh, wait a minute, he had," Dennis wrote.

Nubs' miraculous journey forced the Marine's hand, and Dennis and his fellow Marines unanimously decided to keep the animal, building a doghouse at the camp. When two military police officers told Dennis the dog could not stay at the camp, he decided the only way to properly keep the animal was to get it to the United States.

"This dog who had been through a lifetime of fighting, war, abuse, and had tracked down our team over 70 miles of harsh desert was going to live the good life," Dennis wrote.

In early February, the dog crossed the border out of Iraq and into Jordan, where friends of Dennis were waiting for the animal. The dog currently is receiving the proper vaccinations and will soon be transported to an F-18 pilot at Camp Pendleton in San Diego, the American base where Dennis, also a fighter pilot by training, is stationed. The Marine has received permission to keep Nubs with him at work.

Nubs is not the only dog befriended by an American soldier to earn a trip out of Iraq. Army Sgt. Peter Neesley found two dogs while on patrol during his second tour of duty in Iraq — Mama, a Labrador mix, and her puppy, Boris.

The soldier claimed the dogs, building a doghouse for them and sending photos to relatives in Grosse Pointe Farms, Mich. "They were his family away from home," Neesley's sister, Carey, told ABC News.

But tragedy struck when the 28-year-old sergeant died in his Baghdad barracks in Christmas, the cause of which remains unknown. His family decided one way to ease the grief would be to transport the dogs home, something they reached out to their homestate senator, Carl Levin, the ranking member of the House Armed Services committee, to help arrange. An airline and animal organization helped coordinate the 6,000-mile trip.

"It's second to having Peter come home on his own," the soldier's sister said. "If we can't have Peter, then at least we can have his dogs."

Dennis could be home from Iraq as early as March, his mother said. The dog no longer will have to contend with fighting to survive in the war-torn country, Dennis wrote in an e-mail, but instead will get to bask in the sun on the sunny beaches of San Diego.

It's a day Dennis' mother said she can't wait to see.

"He's always been a big dog lover," she said. "He's supposed to be this big, tough Marine, but he's really a softy."

ABC News' Barbara Pinto contributed to this report.