President Obama accepted an invitation to visit Vietnam some time in his remaining time in office, during a meeting with Vietnamese communist party leader Nguyen Phu Trong.

Obama opened his remarks to the press by announcing the invitation, calling it "indicative of the remarkable progress that's taken place in the relationship between our two countries over the last 20 years."

While the president didn't say when the historic visit would occur, he told Trong that he looks forward to "visiting your beautiful country some time in the future."

The Oval Office meeting came more than four decades after the Vietnam war began. The two leaders discussed deepening cooperation in science, technology, climate change, public health and security, and Obama called Vietnam a "constructive partner," though he noted that they candidly discussed their differences on human rights and religious freedom.

Vietnam is one of nearly a dozen Pacific Rim countries negotiating the Trans-Pacific Partnership trade agreement, and Obama noted that the deal has "enormous potential" of raising labor and environmental standards and spurring job growth for both the Vietnamese and the American people.

They also discussed China's aggression in the South China sea and concern that Beijing's recent activities were not in accordance with international law and "may complicate the situation."

Trong said that the two leaders agreed to continue to move the U.S.-Vietnam relationship forward in all areas ranging from political, diplomatic cooperation, to economic trade and investment to climate change and security cooperation.