U.S. Defense Secretary Leon Panetta (left) shakes hands with Vietnamese Prime Minister Nguyen Tan Dung during a meeting at the Prime Minister's office in Hanoi. (Reuters)

Vietnamese forces seized letters from the corpse of a young U.S. Army sergeant named Steve Flaherty after he was killed in battle more than four decades ago.

A few miles south, a U.S. Marine similarly took a thin maroon diary off the chest of a Vietnamese soldier lying dead in a machine gun pit after a firefight.

The two items — relics of a bygone era when the United States and Vietnam were bitter enemies — on Monday became symbols of the evolving U.S.-Vietnamese relationship.

At a meeting in the Vietnamese capital to discuss possible military cooperation, U.S. Defense Secretary Leon E. Panetta gave the diary to his counterpart, Phuong Quang Thanh. In return, Panetta was presented with Flaherty’s letters — the first high-level exchange of its kind.

The unlikely warming of relations between the two countries has accelerated during the past two years, because of worries on both sides about China’s growing influence and military assertiveness. But the newfound friendship has clear limitations as well, mostly because of strong reservations among Vietnamese leaders, and has been relegated to largely symbolic acts. Ironically, those less-controversial acts — which U.S. officials hope will strengthen the countries’ budding relationship — are rooted in the long and painful war that pitted the United States against Vietnam’s communist leaders for a generation.

On the one hand, Vietnam wants a U.S. military presence to counterbalance China’s ability and propensity to bully its smaller Southeast Asian neighbors, said one Vietnamese military officer, who spoke on the condition of anonymity to be candid. But there also is a healthy dose of fear that the United States will overreach and begin interfering in or exerting undue influence on Vietnam’s domestic and foreign policy.

“It is not a choice between U.S. and China for us. We are our own people,” the officer said.

Vietnam also worries that moving toward the United States too quickly and overtly could cause a backlash from China.

Monday’s meeting did not yield many concrete advances in military cooperation. But as an additional symbolic gesture, Vietnam agreed to open three previously restricted sites to American excavation in search of the remains of still-missing U.S. soldiers.

To date, 980 sets of remains from the Vietnam War have been identified. But nearly 1,700 troops remain unaccounted for, and the remains of about three-quarters of them are thought to be in Vietnam, U.S. officials said.

Investigators say the acidic soil in Vietnam, which erodes bones quickly, and the aging and dying of those who witnessed the war, mean they are racing against a deadline of five to seven more years to successfully identify additional remains.

In the packet of letters returned by Vietnam, U.S. officials say they found two additional, unexpected sets of correspondence from servicemen who they are now working to identify.

Flaherty’s letters were used as propaganda in Vietnamese broadcasts after they were seized. They were kept by a Vietnamese colonel who, U.S. officials said, hoped one day to return them.

“This is a dirty and cruel war,” Flaherty wrote in a letter addressed to “Mrs. Wyatt.” “But I’m sure people will understand the purpose of this war even though many of us might not agree.”

In another letter, to his mother, he wrote: “I definitely will take R&R, I don’t care where so long as I get a rest, which I need so badly, soon. I’ll let you know exact date.”

“If Dad calls, tell him I got too close to being dead but I’m O.K. I was real lucky. I’ll write again soon.”

As for the Vietnamese soldier’s diary, it was picked up by a Marine, Robert “Ira” Frazure, of Walla Walla, Wash., after a firefight near Quang Ngai in March 1966. That same month, a friend of Frazure’s, Gary E. Scooter, was killed in action.

Recently, when Scooter’s sister began research for a book about Vietnam, she interviewed Frazure. Frazure sought Marge Scooter’s help in returning the diary to the family of Vu Dinh Doan, the soldier Frazure had discovered dead in the machine gun pit all those years ago.

The sister brought the diary to the PBS television show “History Detectives.” After U.S. officials were contacted, an exchange was set up for Panetta’s trip.