A Chinese court says a prominent human rights lawyer, Xie Yang, has admitted being "brainwashed" overseas at his trial for inciting subversion.

It released transcripts in which he says he was trained in Hong Kong and South Korea to "develop Western constitutionalism in China".

In a video, he denies being maltreated since his arrest in July 2015.

The lawyer's wife and human rights activists have both said that Mr Xie was tortured in custody.

His trial appears to have been held without advance public warning, the BBC's John Sudworth reports from Beijing, and there was no way foreign journalists could verify the court transcripts which, like the video, were released on Weibo, China's equivalent to Twitter.

He is one a number of prominent lawyers put on trial recently who have mostly represented land grab victims and campaigners for democratic reform. Such cases are considered highly sensitive by the authorities.

President Xi Jinping has overseen increasing restrictions on civil society while warning that Western ideals present a threat to national security.

Mr Xie has been charged with "inciting subversion of state power and disrupting court order".

"My actions go against my role as a lawyer," he said in the video released by the Changsha Intermediate People's Court.

"I want to take this opportunity to express to other rights lawyers my view now that we should give up using contact with foreign media and independent media to hype sensitive news events, attack judicial institutions and smear the image of the nation's party organs while handling cases."

In a precarious situation: Analysis by James Tsao, BBC Chinese

Detained lawyers and human rights activists in China are often subject to similar show trials and abuses as those allegedly endured by Xie Yang. Human rights activists say that few if any receive a fair trial.

Mr Xie has worked on a number of cases considered politically sensitive by China's ruling Communist Party and was among hundreds of lawyers and activists detained in what became known as the "709 crackdown" - named after the date of the first disappearance of a group of lawyers on 9 July 2015.

It was part of the toughest government action against Chinese civil society for years. Although the majority of those held were released on bail, last year six of them were found guilty of serious crimes, with some sentenced for up to seven years in prison.

Mr Xie is now in a precarious position - he has not endeared himself to the government by defending mainland supporters of Hong Kong democracy activists.

Patrick Poon, of human rights group Amnesty International, said the Chinese authorities had wanted to use his trial "to discredit his lawyers and the western media".

On Friday, the UN human rights office demanded that the Chinese government release all lawyers and activists that it said were being held simply for defending the basic rights of Chinese citizens.

Last week Mr Xie's lawyer, Chen Jiangang, was himself detained by police.

Mr Xie's US-based wife said in January that he had been tortured while in custody.

US-based charity Chinese Human Rights Defenders says that Mr Xie informed his lawyers earlier this year that police had subjected him to extensive sleep deprivation, prolonged interrogations, beatings and death threats to get him to confess his guilt and incriminate colleagues.