China will deport nine foreign tourists it had detained over the weekend, apparently after they had watched a "terror" video, their governments said on Friday.
The release of the group - five South Africans, three Britons and an Indian - signals the end of a case that sparked international consternation and outcry.
Authorities in the northern region of Inner Mongolia detained the mostly elderly travellers last weekend along with 11 others in their group while they were on a 47-day historical tour of the country.
Authorities said they were suspected of breaking the law. China's Foreign Ministry said it was not able to immediately comment.
China deported 11 others in the group this week, sparking concern that the remaining nine could be prosecuted.
Gift of the Givers Foundation, a South African charity that has spoken to the media on behalf of the families of those detained, said earlier Chinese law enforcement told the governments some in the group had watched "terror" videos, linked to a banned group, in their hotel.
Imtiaz Sooliman, a spokesman for the charity, said he had been given no information about the video the group had allegedly watched.
"These individuals have no terror links, no criminal record in their country," the foundation said in a statement this week.
A spokesman for the Indian embassy could not be immediately reached for comment, but Gift of the Givers said the Indian national in the group would also be deported.
Nelson Kgwete, a spokesman for South Africa's Department of International Relations and Cooperation, said the South Africans would leave China on Saturday. He said the Chinese government had never indicated why the group was detained.
A British Foreign Office spokeswoman said in a statement that the detainees were in good health.