In the heart of Mong Kok, one of the most densely populated districts on earth, an abandoned Hong Kong police van is enveloped in the student-led demonstrations paralyzing swathes of the city. Along with yellow ribbons and flowers, symbols of the city's pro-democracy movement, protesters have taped a hand-written placard in Chinese and English to the side of the locked and undamaged vehicle.

"We can't accept the Hong Kong police becoming the Gong An," it reads - a reference to China's fearedPublic Security Bureau, which enjoys virtually unfettered powers on the mainland.

The stranded police vehicle and the protesters' warning encapsulate the dilemma that the mass protests pose for China's rulers and the authorities in Hong Kong. They need to contain the campaign for democracy in one of Asia's leading financial hubs without the tools employed on the mainland to suppress dissent, including sweeping powers of arrest, indefinite detention, compliant courts and a controlled media.

While People's Liberation Army forces are stationed in Hong Kong, they have remained in their barracks. They will only be deployed on the streets if rioting and looting break out and the local police are unable to contain the violence, said two people with ties to the central government leadership.

"The mobilization of PLA troops in Hong Kong is a last resort and only if things got totally out of control," one of the people said.

As tens of thousands of protesters gather for a sixth day, their demand for the right to choose their leaders in fully democratic elections poses the biggest popular challenge to the ruling Communist Party since Chinese president Xi Jinping took power two years ago. The Umbrella Revolution, so called for the protesters' use of umbrellas to shield against pepper spray, comes at an inopportune time for Xi. He is trying to steer a slowing economy while moving against powerful vested interests in one of the most wide-ranging purges and anti-corruption campaigns since the Communists came to power in 1949.

"It is a frontal challenge to their authority," Regina Ip, a lawmaker and a top advisor to Hong Kong's embattled political leader, chief executive Leung Chun-ying, says of the protests. "People have to understand how Beijing sees this... China feels threatened," Ip told Reuters.

SKINNY 17-YEAR-OLD

At the forefront of this challenge is student leader Joshua Wong Chi-fung, a skinny 17-year-old with a mop of straight black hair framing his angular face.

Last Friday, after a week-long student boycott of classes, Wong was demonstrating with hundreds of secondary school students outside the Hong Kong government's harbor-front offices. It was 10 p.m. and some of the students were beginning to drift off when Wong picked up the microphone.

"Please everybody, don't go just yet," he pleaded in his crisp, staccato Cantonese through the shrill feedback of the speaker. "Please give me some face and listen before leaving," he joked. "Ok!" the students yelled back.

As Wong spoke, fellow student leaders Alex Chow and Lester Shum, followed by their colleagues, suddenly rushed the three-meter fence and gate protecting the government offices, shouting: "Charge, charge."

Police arrested Wong immediately and took Chow and Shum into custody the next day. But legal limits on the power of the authorities soon frustrated their efforts to take the student leaders out of circulation.

In the High Court on Sunday evening, Justice Patrick Li Hon-leung ordered Wong's immediate release, granting a writ of habeas corpus, one of the British-implemented protections that Hong Kong inherited from its former colonial master. Wong would have no such protection on the mainland where an equivalent right doesn't exist and where protest leaders are often beaten and routinely detained for long periods without trial.

Wong's lawyer, Michael Vidler, says Justice Li told the court that events might have taken a different course if Wong had not been detained for so long. In the two days Wong and his fellow student leaders were held without charge, tens of thousands of protesters had converged on the government offices and three other Hong Kong districts. About an hour before Justice Li ordered Wong's release, riot police had fired volleys of tear gas in a bid to break up the demonstrations, the first time in decades that this riot control measure had been used against Hong Kong protesters.

Flanked by his lawyers, Wong pushed his right hand forward waist-high and flashed a defiant thumbs up as he walked free. His detention had provided the spark that galvanized the city's pro-democracy movement and kick-started Occupy Central, a long-mooted plan to lock down the commercial heart of China's most important financial center.

"DON'T REPEAT JUNE 4"

While leaders in Hong Kong consult with Beijing on how best to clear the streets, the student-dominated protests will be an unnerving reminder for Xi and other top party leaders of the Tiananmen Square demonstrations 25 years ago, in June 1989. That isn't lost on the students. On Sogo Corner in Causeway Bay, Hong Kong's neon-lit equivalent of New York's Times Square, protesters have put up posters that carry the words "Don't repeat June 4."

Already, an image from the Hong Kong protests that draws a parallel with the iconic "tank man" photograph from the Tiananmen demonstrations has gone viral on social media. The image is drawn from a photograph of a protester holding two umbrellas aloft as he is enveloped in a cloud of tear gas.

The greatest fear for China's leaders is that unrest could spread from Hong Kong to the mainland. While Chinese online censors have barred most discussion of the protests, during the first few days they failed to block searches for the Chinese expression for "umbrella revolution". By Wednesday, they had caught up and the term had also been barred. For its part, the state-run media mostly limited its coverage of events in Hong Kong to official condemnations of the protests.

But there are signs that news of the demonstrations has penetrated the mainland firewall. Chinese Human Rights Defenders, a coalition of mainland and international human rights groups, said on Wednesday that dozens of mainland activists had been detained or intimidated for expressing support for Hong Kong's protests. Reuters could not immediately confirm the detentions.

In Macau, the gambling hub that neighbors Hong Kong and where the mainland exerts more influence, several hundred protesters gathered in a central square Wednesday evening in support of the protests. Hong Kong has an independent judiciary and its citizens enjoy wide-ranging liberties, including freedom of speech and assembly, which is denied on the mainland.

NO EASY CHOICES

There are no easy choices for Xi or Leung, China's handpicked man in Hong Kong. If they order a harsh crackdown, it could destroy Hong Kong's reputation as a stable financial center, jeopardize investment inChina and spark capital outflows from the mainland at a time when the Chinese economy is slowing markedly. China is aiming for economic growth of about 7.5 per cent this year. But a run of underwhelming data, including sagging industrial output and falling property prices, suggests expansion may fall short of that target.

A heavy-handed response could also fatally undermine the 'one country two systems' formula by which Hong Kong has been ruled since the 1997 handover and which China's leaders have hoped would one day be extended to Taiwan. Already there have been protests in Taipei in solidarity with the Hong Kong students.

"One country, two systems has also been touted for Taiwan," says Ken Kuo, a Taiwan exchange student living in Hong Kong. He joined the protests in the Admiralty district, where crowds have been largest. "But, as you can see, today's Hong Kong will be tomorrow's Taiwan if it is adopted."

There is also no guarantee that greater force will end the protests. So far, the use of pepper spray and tear gas has only emboldened protesters. It has also won them greater sympathy from residents of the city who view these police tactics as excessive. Trucks from sympathetic businesses have delivered food and bottled water to the protest areas.

The demonstrators have also adopted tactics that make it difficult for the authorities to crack down. Despite the humidity, thunderstorms, crowding and limited facilities in Hong Kong this week, the crowds have been highly disciplined, avoiding violence and confrontation since after the early attempt by the small group of students to force their way into government headquarters.

TIDY REBELS

Teams of volunteers pick up rubbish and litter, even sorting it for recycling. Supplies of food and water are organized in neat stockpiles along the edges of the main traffic arteries in the center of Hong Kong. And the demonstrators, who are blocking key roads, obediently part for ambulances and emergency vehicles.

Protest leaders constantly remind the crowds that they must be peaceful and orderly. On Wednesday morning, when a small group of anti-Occupy Central protesters arrived in Admiralty district, pro-democracy demonstrators linked hands protectively around them to ensure there was no chance of a clash.

After the use of tear gas and pepper spray only succeeded in stoking the demonstrations, police beat a tactical retreat, distancing themselves from the main centers of protest. The hope is that the demonstrators will tire and melt away, said a senior police officer in Hong Kong. In what appears to be part of this plan, pro-mainland groups that routinely mount noisy counter-demonstrations to pro-democracy marches have been largely unseen on the streets.

But if the standoff worsens and Xi is seen to be unsuccessful in ending the protests, that could work against him, says Cheng Li, a senior fellow at the Brookings Institution in Washington.

Xi and his supporters have launched a sweeping corruption crackdown across the mainland, partly designed to take down a dangerous rival, retired senior leader Zhou Yongkang, who used to head China's pervasive security apparatus. The ongoing purge of Zhou and his sprawling network of relatives, political allies and business supporters has convulsed leadership politics in Beijing. A misstep from Xi that leads to ongoing instability in Hong Kong could provide ammunition for his rivals.

FISSURES IN BEIJING

For now, China's leaders are united in their attitude toward Hong Kong, said Li. If the confrontation escalates, Xi could become vulnerable to attack from other leaders who might be unhappy over his corruption crackdown or economic policies, he said.

"They are on the same page largely," Li said of the leadership. "But if some dramatic events start to happen, they might start to have a different view."

Xi will not back down on China's decision that only a handful of Beijing-vetted candidates can stand for the next elections for Hong Kong's chief executive in 2017, says lawmaker Regina Ip.

"In their eyes, the Hong Kong chief executive is more powerful than a provincial Chinese leader," says Ip, who held talks in Beijing last month with Zhang Dejiang, China's third-ranked leader and the top official responsible for Hong Kong. "From their perspective, it is unthinkable that a future leader of Hong Kong is not patriotic or that Hong Kong was allowed to become a base for subversion."

One China-based Western diplomat likened the showdown in Hong Kong to a game of chicken. "Two cars speed toward one another," the diplomat said. "Beijing's strategy is to throw away the steering wheel so the other party has to swerve away first. It's like that with full democracy."

Pro-democracy forces are also standing firm. Even if the protests unwind, the Hong Kong and mainland authorities will still face the fundamental question posed by the demonstrators: Why can't educated, moderate and law-abiding Chinese people choose their own leaders? As the swelling protests indicate, Xi has yet to provide an answer that would satisfy protesters in Hong Kong or for that matter Taiwan's voters who have grown accustomed to changing their government at the ballot box.

Much of the pressure now falls on Leung. He must find a way to end the protests that will satisfy Beijingwithout completely alienating the residents of Hong Kong.

"HANDS OFF"?

The leadership in Beijing appears to have shifted the onus to him. "The central government did not pressure Hong Kong to disperse the protesters," said another source with ties to the leadership in Beijing. "The Hong Kong government was proactive because it did not want to be perceived by the central government to be weak."

A person close to Leung who spoke on condition of anonymity said Beijing was being "very hands off" in what he described as a "critical" moment for the current administration in Hong Kong. He also said that Leung has "never" considered acceding to the protesters' demand that he resign.

In his National Day speech on Wednesday, Leung seemed to suggest that giving all the city's five million eligible voters the right to cast a ballot for candidates that were vetted by Beijing was better than no elections at all. "It is understandable that different people may have different ideas about a desirable reform package," he said. "But it is definitely better to have universal suffrage than not."

Leung will also be wary of the power of Hong Kong protesters when they take to the streets in big numbers. A 500,000-strong protest on July 1, 2003, stunned the Hong Kong government and eventually forcedBeijing's hand-picked leader, Tung Chee-hwa, to step down. It marked the first time since the founding of the People's Republic of China that the Communist Party was forced to back down in the face of popular pressure and jettison a senior leader.

Leung and Tung, now an advisor to the mainland government, stood side-by-side in Hong Kong at the National Day flag-raising ceremony, which marks the anniversary of the founding of the People's Republic on October 1, 1949. The protest leaders didn't disrupt the event. But as Leung, his top officials and dignitaries watched the raising of the Chinese national flag, shouts and chants could be clearly heard from the protesters in Admiralty district, a block behind them.

In an embarrassment to Leung, the protesters did force the Hong Kong authorities to cancel the traditional fireworks display, a centerpiece of the National Day celebrations that normally draws a huge crowd to the harbor front. And he had to travel by boat to the ceremony because the roads were blocked by the protests.