Australian-Chinese writer Yang Hengjun has been charged with espionage for “endangering China’s national security” and engaging in “criminal activities” after being detained in Beijing.

China’s foreign ministry spokeswoman Hua Chunying offered no further details about the case of the novelist and online commentator at a daily news briefing in the capital on Thursday.

“According to our understanding, the Australian national Yang Hengjun was suspected of engaging in criminal activities endangering China’s national security,” Hua said.

“At present, the case is being handled according to law, and Yang Hengjun’s legitimate rights and interests have been fully guaranteed.”

Australia is seeking more information from Beijing after Defence Minister Christopher Pyne raised Dr Yang’s detention with Chinese Defence General Wei Fenghe on Thursday.

Mr Pyne asked that Dr Yang be treated fairly and transparently and have immediate access to consular assistance.

“General Wei assured that, while he was not personally aware of the case, Mr Yang would be treated well and that the general would seek further information,” a spokesman for the minister said.

An Australia-China consular agreement requires either government be told within three days if one of their citizens is detained.

Chinese authorities took four days before alerting Canberra.

“Obviously that is disappointing and we will be raising that too with Chinese government officials,” Mr Pyne said.

Dr Yang’s case is in the hands of the Beijing city branch of the national intelligence bureau.

Dr Yang, 53, had been living in New York as a visiting scholar at Columbia University with his wife and her child and had returned to China last week.

He had left New York on January 18 for Guangzhou, where he was prevented from boarding his connecting flight to Shanghai with his wife and daughter. Dr Yang is said to be under “residential surveillance”, which is similar to home detention.

Australian Foreign Minister Marise Payne on Thursday requested details of the charges brought against him.

Senator Payne said that at this stage there was no evidence to suggest Mr Yang’s detention was connected to international tensions around Chinese telco Huawei.

In 2011, there were concerns for Dr Yang’s safety when he disappeared after calling a friend from a Chinese airport claiming he was being followed by three men.

He later claimed the matter had been a “misunderstanding”.