A Japanese documentary filmmaker detained in Myanmar and sentenced to 10 years in prison for allegedly breaking immigration law, among other violations, has been given a pardon and will return home, the Japanese government said Thursday.

Toru Kubota was detained on July 30 while filming a protest against the military, which seized power from the democratically elected government in a February 2021 coup.

Riot police arrest anti-coup protesters on Feb. 27, 2021, in Yangon, Myanmar. (Getty/Kyodo)

Kubota, 26, was released Thursday and left the Southeast Asian nation for Thailand. He is expected to return to Japan on Friday, Chief Cabinet Secretary Hirokazu Matsuno said.

Kubota told reporters that he was "not in a condition to talk" when he arrived at an airport in Thailand, adding that he will speak to the media after returning to Japan.

The documentary filmmaker was freed "based on the strong request" by the Japanese government, Matsuno said at a news conference.

The top Japanese government spokesman said Kubota is among four foreign nationals granted amnesty, together with 5,774 local prisoners.

Those pardoned include Australian Sean Turnell, former economic adviser for deposed leader Aung San Suu Kyi, and former British envoy Vicky Bowman, local media reported.

Kubota had been given a seven-year sentence for sedition and electronic communications-related violations as he participated in the demonstration and communicated with protesters while filming. He received an additional three years for entering the country from neighboring Thailand using a tourist visa.

The military also alleges Kubota previously reported on the Rohingya Muslim minority group and disseminated false information. The Rohingya have been persecuted in the Buddhist-majority country, with hundreds of thousands uprooted and forced to flee to neighboring Bangladesh in recent years.

Related coverage:

Japanese documentary filmmaker gets additional prison time in Myanmar

Japanese documentary filmmaker gets 7-year prison term in Myanmar

Myanmar begins trial of detained Japanese filmmaker