China has released on bail the last of four Japanese men held on suspicion of intruding into a restricted military area in the northern province of Hebei.
The other three were freed at the end of September after reportedly admitting they had violated Chinese law.
A Japanese construction firm has said they were preparing a bid to dispose of chemical weapons from World War II.
Relations between Beijing and Tokyo dipped last month after Japan seized a Chinese trawler.
However, high-level contacts were restored when the captain was released after two weeks. The Chinese and Japanese prime ministers recently met at a summit in Belgium.
According to China's official Xinhua news agency, 57-year-old Sadamu Takahashi was released on bail in the city of Shijiazhuang on Saturday.
He was instructed "to write a statement of repentance" and had already "left the place where he was residing under surveillance after going through legal procedures", Xinhua reported.
Mr Takahashi had been detained "for intruding [into] the Chinese military zone and illegal filming military targets", it added.
The Japanese news agency, Kyodo, quoted the Japanese embassy in Beijing as saying he was in "good condition" and might be back in Japan as early as Sunday.