Six detained South Koreans are set to return home from North Korea in a rare cross-border homecoming, officials in Seoul said Thursday.

The South received a letter from the North Korean Red Cross saying that the South Korean citizens, who had been detained after attempting to enter the North without permission, would be released across the demilitarized border Friday, the South’s Unification Ministry said in a statement.

The ministry, which handles relations with the authoritarian North, offered few details about the returnees but said they were all men between the ages of 27 and 67. It was not clear when they were captured or how long they have been held. The South said it would investigate how the men had entered North Korea.

On the divided Korean Peninsula, thousands of South Koreans have been held for decades in the North, including captured soldiers who fought for the South during the Korean War and abductees, mostly fishermen, who were snatched by North Korean gunmen. But the six returnees appear to come from a less common group: those who either tried to enter the North or strayed too close to its border.

South Korean officials indicated that four of the men could be from a group detained since 2010. At the time, North Korea’s state-run news agency said it was investigating four South Koreans who had “illegally entered.” The South had since asked the North for information on the men’s identities and whereabouts, but had met with no success.

“South Korea’s continued efforts to bring back its citizens have paid off,” said Hwang Jung-joo, a director at the Unification Ministry who handles humanitarian issues and families separated by the war about 60 years ago. “The South Korean government welcomes the North’s decision, even though the response came in very late.”

The men’s release would be a small indication of progress in cooperation between North and South Korea, whose governments in recent months have sought to restart joint humanitarian projects and have halted the strident war threats of March and April.

In September, however, the North indefinitely postponed a planned set of reunions for elderly relatives separated by the demilitarized border. On Wednesday, a Unification Ministry spokesman said the South had no plans to restart talks about those reunions, according to the South’s Yonhap news agency, because it was the North that had unilaterally called off the events.

Yoonjung Seo contributed to this report.