A Chinese soldier stands guard in front of Tiananmen Gate outside the Forbidden City in Beijing.

A Canadian citizen who was detained in China this month has returned to Canada after being released from custody, a Canadian government spokesman said on Friday.

The spokesman did not specify when the Canadian was released or returned to Canada. Earlier in the day, broadcaster CBC identified the citizen as Canadian teacher Sarah McIver.

China's Foreign Ministry said this month that McIver was undergoing "administrative punishment" for working illegally.

McIver was the third Canadian to be detained by China following the Dec. 1 arrest in Vancouver of Meng Wanzhou, chief financial officer of the Chinese telecommunications giant Huawei Technologies, but a Canadian official said there was no reason to believe that the woman's detention was linked to the earlier arrests.

Foreign Minister Chrystia Freeland did not mention the woman in calling for the release of the other two Canadians last week.

China's Foreign Ministry did not immediately respond to a request for comment.

On Saturday, a Chinese court will hear an appeal in the case of a Canadian citizen held on drugs charges, that could further test the tense relations between the two countries.

The high court in the city of Dalian in the northeastern province of Liaoning will hear the appeal of Robert Lloyd Schellenberg from 2 p.m. (0600 GMT), it said in a statement this week.

A Dalian government news portal said Schellenberg was a Canadian and that this was an appeal hearing after he was found by an earlier ruling to have smuggled "an enormous amount of drugs" into China.

Canada's government said this week it had been following the case for several years and providing consular assistance, but could provide no other details, citing privacy concerns.

Drugs offences are usually punished severely in China.

China executed a Briton caught smuggling heroin in 2009, prompting a British outcry over what it said was the lack of any mental health assessment.