SEOUL, South Korea (AP) — North Korea sent back a South Korean fishing boat and its crew who Pyongyang says were detained for crossing the eastern sea border between the rivals.

While the North's state media said the decision was based on humanitarian grounds, experts said it wasn't clear whether the repatriation reflected intentions to improve relations with the South amid heightened animosity over Pyongyang's expanding nuclear program.

The boat's 10 crew members included not only South Koreans, but also three Vietnamese fishermen, which might have influenced the North's decision for a quick repatriation, said Hong Min, an analyst at Seoul's Korea Institute for National Unification.

Hours after announcing the repatriation plans through the Korean Central News Agency, North Korea sent back the boat and fishermen in designated waters off the peninsula's eastern coast Friday evening. The fishermen, who arrived at the South Korean port of Sokcho late Friday, appeared to be in good health, a South Korean coast guard official said.

The fishermen will be questioned by South Korean authorities over the circumstances of their detention and their experience in the North, the official said, speaking on condition of anonymity citing office rules. The fishermen didn't leave the ship as officials searched the vessel for nearly two hours in Sokcho before they were escorted to another port in nearby Uljin, where they might be questioned.

The KCNA announcement came hours before U.S. Secretary of Defense Jim Mattis visited the heavily-armed land border between the Koreas and stressed Washington's commitment to defend ally Seoul against North Korean threats.

The agency said the South Korean boat, 391 Hungjin, was captured at dawn Saturday after it "illegally intruded" into North Korean waters. The crewmen deliberately entered North Korean waters for fishing, but "honestly admitted their offence, repeatedly apologizing and asking for leniency," the agency said.

Earlier on Friday, Baik Tae-hyun, spokesman of South Korea's Unification Ministry, said maritime police had been searching for the boat after it was reported missing. He refused to say whether the South thought the boat had intruded into North Korean waters before the North's announcement.

"It's fortunate that our fishing boat and fishermen are being sent back," said Baik, who added that it was likely the first time Pyongyang used its state media to inform Seoul of a decision to repatriate South Koreans.

The Koreas, which haven't held formal talks in nearly two years, have relied on media announcements to communicate since February last year, when the North declared to end all contact over direct communication lines between the countries.

Pyongyang was angry over Seoul's decision to pull South Korean companies out of an industrial park in the North Korean border town of Kaesong, the last remaining major symbol of cooperation between the rivals. That move followed the North's fourth nuclear test in January 2016 and a subsequent long-range rocket launch.

The Unification Ministry said North Korea last detained a South Korean fishing boat in 2010 before returning it. South Korea often sends back North Korean fishermen who enter its waters, including several times this year. But it's more unusual for South Korean boats, which are equipped with better navigation equipment, to drift into the North.