Sarah McIver, a Canadian teacher who was detained in China earlier this month, has returned to Canada after being released from custody, Global Affairs Canada says.

"Global Affairs can confirm that a Canadian citizen, who was detained in China this month, has been released and has now returned to Canada," spokesperson Richard Walker said in an email. "Due to the provisions under the Privacy Act, no further information can be disclosed."

McIver's aunt, Rhona McIver, told CBC News that the Alberta woman's mother and sister had travelled to Vancouver to pick her up and that the family is "thrilled" she is back home.

Earlier this month, McIver became the third Canadian detained in China in recent weeks. She was held over a work-permit issue related to her teaching job and was sentenced to administrative punishment for illegal employment, according to a spokesperson for the Chinese government.

McIver's arrest came just days after the detentions of Canadians Michael Kovrig and Michael Spavor, though both Canada and China insisted her case is different from that of the two men.

Tensions have been high between Canada and China since the Dec. 1 arrest of Meng Wanzhou, the chief financial officer of Chinese telecom giant Huawei Technologies.

Canada made the arrest at the Vancouver International Airport at the request of the U.S. officials, who accuse her of violating trade sanctions on Iran. Meng has since been released on bail pending extradition proceedings.

Canadian businessman Michael Spavor, left, and Canadian diplomat Michael Kovrig were taken into custody on allegations of endangering China's national security, officials in that country say. (The Associated Press/International Crisis Group/The Canadian Press)

Not long after the tech executive's arrest, Chinese officials confirmed Kovrig and Spavor had been detained separately in China on national security concerns.

Chinese officials have not exactly said that the two men are in custody in retaliation for Meng's arrest, but they have pointedly linked the cases, insisting at length that Meng's arrest was illegal and an international affront, while Kovrig and Spavor have been detained properly under Chinese law.

Kovrig is a Canadian diplomat currently on leave from Global Affairs as he serves as an adviser to the International Crisis Group think-tank, while Spavor is a businessman who arranges tours of North Korea.

Canada and its allies have been pushing back against the detentions, with Foreign Affairs Minister Chrystia Freeland saying last week that the government is "deeply concerned" by the "arbitrary detention" of the two men.

Global Affairs did not say when McIver was released or when exactly she returned to Canada.