(CNN) -- U.S. Army Sgt. Steve Flaherty was in a tough spot and he knew it.
"If Dad calls, tell him I got close to being dead but I'm O.K.," he wrote to his mother. "I was real lucky. I'll write again soon."
Not long after that, Flaherty's luck ran out in the jungles of Vietnam. He never wrote to his mother again.
His letter to his mother, along with at least three other letters, fell into the hands of the North Vietnamese soldiers when he was killed in March 1969.
Now those letters are on their way home.
Nearly four decades after the end of the Vietnam War, the United States and Vietnam have exchanged personal papers taken from the dead bodies of each others' troops for the first time, the Pentagon announced Monday.
On a historic visit to Hanoi, U.S. Defense Secretary Leon Panetta handed over a diary taken by a U.S. Marine from the body of Vietnamese soldier Vu Dinh Doan in 1966.
In exchange, Vietnamese Defense Minister Phuong Quang Thanh gave Panetta the letters taken from Flaherty's body and later used in Vietnamese propaganda broadcasts.
A top Vietnamese colonel, Nguyen Phu Dat, had kept the letters since the war, and mentioned them last summer in an online publication about documents from the war years.
A retired Pentagon prisoner-of-war and missing-in-action expert ran across the reference a few months later, the Department of Defense said.
The Pentagon and State Department worked with counterparts in Vietnam to arrange the handover of the Flaherty letters to Panetta, who will have them returned to Flaherty's family.
While the Flaherty letters remained in Vietnam, Robert Frazure of the U.S. Marine Corps brought the Vu Dihn Doan diaries home to Walla Walla, Washington, and kept them after his discharge from the military.
He later gave them to the sister of one of his buddies killed in the war as she researched the conflict. She passed them to the PBS program "The History Detectives," who tracked down Vu Dihn Doan's family and gave the diary to American officials to hand back.
Seeing the Flaherty letters for the first time on Monday, Panetta said "a lot of blood was spilled" on both sides but that he "hoped it helped in healing relations" between the two countries.
Panetta is on a tour of Asia that includes Singapore and India. His trip aims to boost military ties in the region.
On Sunday, he visited a former U.S. Navy base in Cam Rahn Bay, marking the first trip to the base by an American defense secretary since U.S. forces pulled out of Vietnam nearly 40 years ago.
Standing on the USNS Richard E. Byrd, Panetta said the Vietnam generation "is my generation."
He called on those present to "heal the wounds of the past," saying it makes the sacrifices of those who died worthwhile and will help build a better future.