It's been a rough week for Chinese leader Xi Jinping, with a series of events putting a dent in his strongman image and that of the Chinese Government.
In Australia, one of Beijing's own purported spies who had allegedly been working to influence elections in Hong Kong and Taiwan, has defected.
In China itself, a series of new documents exposed the extent of mass internment and torture of over a million Uighur Muslims in northwest Xinjiang.
And of course, there's Hong Kong, where the anti-Beijing camp won a stunning victory in the district elections, sending a powerful message to Xi's Government and the rest of the world.
They've since received some reassuring backup from the United States, with President Donald Trump signing a human rights bill to protect them.
HONG KONG'S SURPRISE ELECTION RESULTS
Earlier this week, China was dealt a humiliating blow following Hong Kong's district elections.
These local elections came six consecutive months into ongoing protests against the Chinese Government's increasing political presence in the semi-autonomous territory.
Of all of Beijing's headaches this week, these results were arguably the worst. Beijing was banking on a "silent majority" of Hong Kong residents turning out in droves to vote for pro-Beijing parties and put an end to the protests, which have grown increasingly chaotic.
Indeed the 71 per cent turnout was unprecedented, with more than double the number of voters as the last district elections in 2015.
But pro-democracy candidates emerged victorious in 347 of the 452 district council seats up for grabs, while a number of high-profile pro-Beijing candidates lost their seats.
It was the strongest "official" rejection of mainland China by the southern territory to date, and one they've struggled to keep under wraps.
At the onset of the protests in June, China's state media stayed quiet, pretending they weren't taking place. When they could ignore them no longer, they pushed a narrative of the protesters as disruptive young antagonists.
When the election results came out, China's media was initially silent. State media agency Xinhua refused to detail the results, instead reporting that "rioters harassed patriotic candidates" and that the "most pressing task for Hong Kong at present is still to bring the violence and chaos to an end and restore order".
The China Daily later put out an editorial claiming the pro-democracy camp engaged in "sabotage" and "intimidation", but refused to detail the actual results.
"The result of Sunday's district council election marks a setback for Hong Kong's democratic development, as the results were skewed by the illegal activities of the opposition camp to the benefit of their candidates," it said.
"In the run-up to Sunday's voting, members of the opposition camp, particularly their young agitators, engaged in an all-out campaign to sabotage the campaign activities of pro-establishment candidates and intimidate their supporters from going to the ballot box," the English-language newspaper went on.
The hawkish Global Times newspaper accused the west of interfering in the election and helping the pro-democracy camp.
The embattled Carrie Lam, Hong Kong's Beijing-appointed chief executive, said her Government would "seriously reflect" after local elections gave massive gains to pro-democracy candidates.
Lam said many felt the results reflected "people's dissatisfaction with the current situation and the deep-seated problems in society".
The Government would "listen to the opinions of members of the public humbly and seriously reflect", she said.
RECOVERED DOCUMENTS EXPOSE XINJIANG CAMPS
Over the past year, China has faced increasing scrutiny over the suspected detainment, re-education and forced labour of over a million Uighur Muslims in its northwest.
Beijing has long denied this — initially denying the existence of the facilities, and later claiming they were voluntary "vocational training" centres.
Earlier this week, a leaked cache of highly classified Chinese Government documents exposed the extent of mass surveillance and detention under the chilling system.
The documents, which date back to 2017, were obtained by the International Consortium of Investigative Journalists and shared with 17 international media partners.
While the Xinjiang camps are no secret by this point, the documents are still a big deal. They provided concrete proof China has been lying about the detainment camps, and more detail of the lengths to which Beijing has gone to stamp out the Uighurs' identities.
This proof puts greater international pressure on other countries to condemn Beijing for their human rights violations; many countries have been accused of not adequately doing so due to their financial ties to China.
The confidential documents lay out the Chinese Government's deliberate strategy to lock up minorities, most of whom are Muslims, to rewire their thoughts and even the language they speak. The documents stipulate watch towers, double-locked doors and blanket video surveillance "to prevent escapes".
They describe an elaborate scoring system that grades detainees on how well they speak the dominant Mandarin language, memorise ideology and adhere to strict rules on everything down to bathing and using the toilet.
Australia was among 23 countries that joined forces to condemn China at the United Nations over the camps earlier this month, adding to a growing rift between Canberra and Beijing.
ALLEGED CHINESE SPY PLOT EXPOSED
On Sunday, Nine's 60 Minutes aired an extraordinary documentary claiming that Melbourne luxury car dealer Nick Zhao, 32, was cultivated by the Chinese Government to run as a Liberal Party candidate.
Citing sources with knowledge of the alleged plot, the programme revealed that Zhao reported the plot to Australia's spy agency ASIO.
He was then reportedly found dead in a Melbourne hotel room in March and investigators have been unable to conclude how he died.
It also aired the claims of self-proclaimed Chinese spy Wang "William" Liqiang, who provided ASIO with details of how China's senior military intelligence officers fund and conduct political interference operations in Australia, as well as in Hong Kong and Taiwan.
The 27-year-old is currently hiding out in Sydney with his wife and 2-year-old son, saying he lives in constant fear of being watched, followed or attacked.
He claimed his loyalty to the Chinese Government faltered after he received a fake South Korean passport and was made to travel to Taiwan to interfere in the upcoming election there.
"This time I was requested to change my name and whole identity to go to Taiwan and be a spy there," Wang told 60 Minutes.
"This is the main reason why I came to Australia to seek asylum. As Taiwan's ability of anti-infiltration is very strong, once I was found out, then my safety would be at stake. What would my family, my young son do? Who could protect me?"
TRUMP SIGNS BILLS PROTECTING HONG KONG
On Wednesday, the US President signed the Hong Kong Human Rights and Democracy Act into law, which passed both houses of Congress almost unanimously.
One bill called for sanctions against Chinese and Hong Kong officials judged to have abused human rights in the southern territory.
The other banned exports of tear gas, pepper spray, rubber bullets, water cannons, tasers and other "non-lethal" weapons often used in riot control, including by Hong Kong police.
"I signed these bills out of respect for President Xi, China, and the people of Hong Kong," Trump said in a statement.
"These laws are being enacted in the hope that leaders and representatives of China and Hong Kong will be able to amicably settle their differences leading to long-term peace and prosperity for all."
China reacted furiously to the signing of the bills, summoning the US ambassador to protest and warning the move would undermine co-operation with Washington.
Chinese Vice Foreign Minister Le Yucheng told US Ambassador Terry Branstad that the move constituted "serious interference in China's internal affairs and a serious violation of international law," a foreign ministry statement said.
Le called it a "nakedly hegemonic act", and urged the US not to implement the bills to prevent greater damage to US-China relations, the ministry said.