HANOI, Vietnam — The United States is rescinding a decades-old ban on sales of lethal military equipment to Vietnam, President Obama announced at a news conference in Hanoi on Monday, ending one of the last legal vestiges of the Vietnam War.

The United States has long made lifting the embargo contingent on Vietnam’s improving its human rights record, and recently administration officials had hinted that the ban could be removed partly in response to China’s buildup in the South China Sea.

But Mr. Obama portrayed the decision as part of the long process of normalizing relations between the two countries after the Vietnam War.

“The decision to lift the ban was not based on China or any other considerations,” he said, with the Vietnamese president, Tran Dai Quang, standing stiffly by his side. “It was based on our desire to complete what has been a lengthy process of moving toward normalization with Vietnam.”