Australia on Monday criticized the treatment of a Chinese-born Australian writer detained by Beijing for almost a year and sought details of his case, prompting China to say it was being dealt with according to law, amid the neighbors’ prickly ties.

Yang Hengjun, a former Chinese diplomat turned online journalist and blogger, was formally arrested in August on suspicion of espionage, seven months after he was originally detained in the southern city of Guangzhou, Guangdong province.

Espionage is punishable by death in China.

Australia had been raising concerns about Yang’s imprisonment “for some time,” Prime Minister Scott Morrison said, adding that the welfare of an Australian citizen was paramount.

“Australia always has to stand up for our citizens and we have to be true to who we are as a people,” he told reporters in the capital, Canberra.

RELATED STORIES Australia launches anti-espionage task force amid China spy concerns

Australia wanted to see clear details of the case against Yang, Morrison has said, and ensure him access to lawyers and family.

Foreign Minister Marise Payne said Australian consular officials who recently visited Yang had reported “unacceptable” conditions, including isolation and daily interrogations, sometimes while he was shackled.

The public rebuke immediately drew a negative response from China, which is Australia’s largest trading partner. Previous diplomatic spats have resulted in disruptions to exports of coal and wine.

“Our judicial organs deal with the case in accordance with law and we fully guarantee his legitimate rights and interests,” foreign ministry spokeswoman Hua Chunying told a daily news briefing in Beijing.

Yang was “now in good health condition and there is no so-called torture at all,” she added.

Although Yang’s more recent writings had mostly avoided Chinese politics, he became prominent in the early 2000s when he earned the nickname “democracy peddler.”

One of Yang’s Australian lawyers, Sarah Condon, said China’s Ministry of State Security was giving 54-year-old Yang several medications daily because he had received a diagnosis of high blood pressure and kidney problems.

“We’re concerned because he went in as a fit and healthy man,” Condon said. “Now he has this purported diagnosis and is being fed a concoction of drugs.”

Morrison commented on the case as he announced that Australia will spend 87.8 million Australian dollars ($59.58 million) to create a new task force to tackle foreign interference.

The Australian leader did not specifically cite China, but Canberra has become increasingly wary about Beijing’s influence within Australia and across the Pacific.

Reuters this year reported Canberra had determined that Beijing was responsible for a cyber-attack on Australia’s parliament and three largest political parties, just months out from an election.

China denied it was behind the attack. Last month it refused visas to two Australian lawmakers.

China buys more than a third of Australia’s total exports and sends more than a million tourists and students there each year.