SEOUL, South Korea — The United States expects to transfer the remains of some American servicemen out of North Korea in the coming weeks, bringing them home 65 years after the end of the Korean War, a United States military official said on Tuesday.

American and North Korean officials met on the border between North and South Korea on Monday in an effort to coordinate the repatriation of remains believed to be those of American soldiers killed during the 1950-53 war.

They have yet to sort out details such as the exact date and the number of remains to be shipped out of North Korea, said the United States official, who spoke on the condition of anonymity because of the delicacy of the matter. The repatriation is expected to take place by the end of the month or the beginning of next month, the official said on Tuesday.

In his meeting with President Trump in Singapore on June 12, the North’s leader, Kim Jong-un, committed to returning the remains of American troops recovered from major Korean War battle sites in his country, including the “immediate repatriation of those already identified.”