SHANGHAI -- An official Chinese newspaper has accused Hillary Clinton of China-bashing, and of degrading herself to try to compete with Donald Trump in the U.S. election campaign. The criticism followed the former secretary of state’s tweet criticizing China’s President Xi Jinping for presiding over a United Nations meeting on women’s empowerment this weekend, even though his government had detained a group of feminist activists earlier this year.

The angry response from the official Global Times came shortly before Xi was due to address the U.N. General Assembly in New York Monday. It is being seen as a sign of just how much Beijing wants Xi’s current visit to the U.S. to be seen as a success, in order to boost his status both at home and abroad, as China grapples with a slowing economy and signs of a loss of foreign investor confidence.

Chinese media on Monday headlined Xi’s pledge of $2 billion for an aid fund for developing countries, and debt forgiveness for the poorest, as a breakthrough for China’s diplomacy. They also highlighted Xi’s announcement of a $10 million donation to a U.N. fund for women at the event, which was held to mark the twentieth anniversary of the U.N. Women’s Conference in Beijing, which set landmark goals for women’s development.

XiJinping_UN_Sept2015 Chinese President Xi Jinping stands in front of the United Nations emblem as he poses for a photograph with U.N. Secretary-General Ban Ki-moon (unseen) after addressing the United Nations Sustainable Development Summit 2015 at the United Nations headquarters in Manhattan, New York on Sept. 26, 2015. Photo: Reuters/John Taggart

But Clinton, who attended the Beijing conference in 1995, tweeted that it was “shameless” that Xi was hosting the women’s event, “while persecuting feminists.” She was referring to the case of five young Chinese feminist activists who were arrested shortly before International Women’s Day in March this year, and were held for a month without formal charge. The women had been planning to stage events against sexual harassment, in part to coincide with a debate on a new government-proposed law on domestic violence. They were eventually released following an international outcry, but have remained under scrutiny and are forbidden from taking part in further activism. (The lawyer who represented them has also since been arrested, and her company officially denounced as "a criminal gang.")

Clinton’s criticisms, however, were no more than “vulgar [and] ignominious shenanigans… more than reminiscent of the demagogue Donald Trump,” fulminated the Global Times, a tabloid published by the official People’s Daily. It was an apparent reference to the would-be Republican Party presidential candidate’s claim that he would bring back two million jobs “stolen” by China.

“If Hillary is doing what Trump does, she is degrading herself,” the paper added. It said “China-bashing” had become an “effective way… to win more votes” in U.S. election campaigns, but added that it was a shame that as “a lawyer, the former hostess of the White House and also a senior leader in the government,” Clinton had “thrown away her decency and reputation only to gain a leg up in the election.” It speculated that she might be “trying to get back in the game by directing people’s attention to China,” following the controversy over her private emails, which “has dealt a heavy blow to her.”

The Global Times said Clinton’s words and actions were “worrying,” since she remained a front-runner for the presidency, and would have to make “such a big U-turn” in order to “rectify her China bashing words” if she was elected to the White House. It argued that her husband Bill Clinton had done just that when he became president (he had attacked his then rival George H.W. Bush in the election campaign for “coddling up to tyrants from Baghdad to Beijing,” before going on to visit China as president in 1998). But it suggested this might be harder to do nowadays as there was much more global attention on China.

BillClinton_JiangZemin_Sept2000 Then president of China Jiang Zemin of China shares a laugh with former U.S President Bill Clinton at the start of their bilateral meeting on Sept. 8, 2000 at the Waldorf Astoria Hotel in New York City. Photo: Reuters

In the past, China has often shrugged off criticisms during U.S. election campaigns as mere rhetoric, which will be forgotten after elections are over. But these comments suggest Clinton’s criticisms touched a raw nerve, particularly since, given her links to the Obama administration, they hint at continuing suspicions that undermine the relatively conciliatory mood during Xi’s state visit -- in which the two sides pledged to reduce tension over cyber spying. They may also add to Chinese worries that the next U.S. administration may take a tougher line on China.

Chinese media on Monday generally focused on positive reaction from foreign media to Xi’s U.N. development speech, and stressed that it was repeatedly interrupted by applause. The paper also swooned over Xi’s wife Peng Liyuan’s debut English language public speech to a U.N. forum, in which she spoke of her childhood in a poor rural area, and of the need to give young girls the chance of an education. The Global Times said she had “displayed her charm and pivotal diplomatic role,” and quoted a study that said that a rising China needed to “convey kindness and goodwill to the world by a first lady like Peng.”

However the strength of international criticism of the detention of the five feminist activists cannot be underestimated -- and critics say China’s kindness and goodwill also failed to extend to journalist Gao Yu, jailed for seven years after she was accused of releasing a government plan to reduce the influence of Western social and political ideas on China to the Western media. While Gao confessed in a televised interview, her lawyer later said she had done so under duress, in order to protect her son. And critics have also raised the case of Cao Shunli, a human rights activist who was detained as she tried to leave China to attend a U.N. forum in Geneva two years ago. She died in hospital six months later, after reportedly being denied medical treatment for several months.

GaoYu_June2012 Gao Yu, one of China's most prominent journalists, was sentenced to jail on April 17, 2015, on state secrets charges. Here, she is seen attending the opening of a photo exhibition by Liu Xa, wife of Nobel Laureate Liu Xiaobo, in Hong Kong, on June 9, 2012. Photo: Reuters/Bobby Yip

The original women’s conference in 1995 also highlighted China’s ambivalence toward civil society activism. At the last minute, the Chinese government moved the conference from the city center to a remote suburb, saying the planned venue had structural problems; however it was later used in the 2008 Olympics, and many attendees believed the move reflected official fears of Western social activists amassing in central Beijing.

Experts say that while women have undoubtedly gained a far greater status in Chinese society in recent years, China’s political system remains male-dominated. The Communist Party, which Xi heads, has moved to bring more women in over the past decade -- yet the percentage of female members remains only 25 percent.