China views democratically governed Taiwan as its own territory and has stepped up political and military pressure over the past four years to try and enforce those sovereignty claims.

Lee Meng-chu went missing in southern China in 2019. The following year, Chinese state media reported he was an active member of a Taiwan separatist group who posed as a businessman to conceal his espionage role.

Lee was arrested when he entered China and the state media reports said he was found to have photographs and videos of Chinese military drills in the city of Shenzhen, as well as materials showing he supported anti-government protests in Hong Kong.

Taiwan's Mainland Affairs Council spokesman Jan Jyh-horng told reporters that Lee had been released by China and left the country, adding that China had not informed Taiwan of the decision and the news had come to Taiwan's government via Lee's family.

China's Taiwan Affairs Office did not respond to a request for comment.

Lee told the BBC's Chinese language service that upon his release he had been sent to Japan.

Lee said in the same interview that he was merely a curious tourist wrongly accused of being a spy.

"I didn't know what I did, but in order to get out early, I had to plead guilty and admit guilt," he added.

Taiwan's government, which says only the island's people can decide their future, has repeatedly warned its population to exercise caution in visiting China given the risk of arbitrary detention.

(Writing by Ben Blanchard; editing by Miral Fahmy)