North Korea has expelled a Japanese man detained for allegedly breaking the law during a recent tour of the country, state-run media and a diplomatic source in Japan said as the two neighbors continue their hot-and-cold relationship.

In a terse two-line statement released late Sunday, the North’s official Korean Central News Agency said Japanese national Tomoyuki Sugimoto was freed on humanitarian grounds after he was detained for breaking an unspecified law while visiting the country.

The diplomatic source, quoted Monday by Kyodo News, confirmed Sugimoto’s release and said he had been deported to China, where Japanese officials were questioning him and conducting a health check.

A source in China close to North Korea told Kyodo that Sugimoto was expected to be moved to Beijing later.

Tokyo and Pyongyang do not have diplomatic relations and Japan often conducts its diplomacy with the North via its embassy in Beijing and its consul general in Shenyang, a Chinese city close to the border with North Korea.

Chief Cabinet Secretary Yoshihide Suga had said earlier Monday that he was aware of the KCNA announcement, but pointedly refused to answer any related questions, including whether Sugimoto is safe, or on the prospects and timing of his return.

“Given the nature of the matter, I will refrain from comment,” Suga, the government’s top spokesman, told a regular news conference.

Sugimoto, who media reports said is believed to be a 39-year-old videographer from Shiga Prefecture, was detained on suspicion of shooting video footage of a military facility when he visited the western port city of Nampo with a tour group, reports citing Japanese government officials said earlier this month.

Nampo is home to a major naval base, shipyard and missile factory.

“Tomoyuki Sugimoto, who visited the DPRK as a Japanese tourist recently, was kept under control by a relevant institution to be inquired into his crime against the law of the DPRK,” the KCNA statement said, using the acronym for the North’s formal name, the Democratic People’s Republic of Korea.

“The relevant institution of the DPRK decided to leniently condone him and expel him from the DPRK on the principle of humanitarianism,” it said.

Japan has been skeptical of its nuclear-armed neighbor’s recent charm offensive, which has resulted in meetings with the leaders of South Korea and China, and culminated in a landmark summit in Singapore in June with U.S. President Donald Trump.

Still, Prime Minister Shinzo Abe has worked to forge his own path and reconcile his outspoken support for Trump’s now defunct “maximum pressure” policy with the U.S. president’s softened tone on the North’s nuclear program.

Abe has repeatedly voiced hopes of holding direct talks with the North, though caveats abound. He has stressed that the issue of the North’s missile and nuclear programs must be resolved, but — perhaps more importantly — has also first demanded that Kim reveal the fate of Japanese citizens abducted by North Korean agents to train its spies in the 1970s and ’80s.

For his part Kim, too, appears interested in talks with Abe, telling South Korean President Moon Jae-in in late April that he is ready to hold a dialogue with Japan at “any time.”

But the unpredictable North has also insisted in state-run media that Japan continues to raise the abduction issue as a way of pretending to be a victim, and that without atonement for its own past crimes “it can never take even one step toward the future.”

J. Berkshire Miller, a senior visiting fellow with the Japan Institute of International Affairs in Tokyo, said that Sugimoto’s detention was likely “on trumped-up charges” and was likely a move by Pyongyang “to signal its goodwill ahead of potential high-level talks with Japanese officials.”

“It’s part of the persistent hot-and-cold approach the North has enlisted in its dealings with Japan over the years, as it seeks engagement, reduced sanctions and Japanese financial assistance, while at the same time critiquing Tokyo’s firm posture on the abductions matter and its weapons of mass destruction programs,” Miller said.

While the decision by Pyongyang not to use Sugimoto as a bargaining chip with Tokyo was a positive signal, Miller said it was too early to gauge whether his release would have any impact on the lingering irritations between the two sides.

“In fact, this type of move — which will be framed as a concession by Pyongyang — may be employed to stall or circumvent any meaningful progress on resolving the abductions issue,” Miller said.

The decision to release Sugimoto, which comes after the White House canceled a highly anticipated visit to Pyongyang by U.S. Secretary of State Mike Pompeo over concerns of insufficient progress in nuclear negotiations, could also be timed to portray the North as a trustworthy partner as fears grow of a rift between the two nuclear-armed states.

“The DPRK is likely to use any opportunity to demonstrate that it is a responsible actor and that a collapse of the diplomatic process must be blamed on the other parties, the U.S. and Japan” in particular, said Sebastian Maslow, a research fellow at the University of Tokyo who has written extensively on North Korea-Japan relations.

“This current move is part of this attempt,” he added.