HONG KONG—It started with hope, lurched into violence, and ended in despair.
When police swept through a deserted but devastated university campus Thursday, it marked the end of a 12-day standoff between security forces and protesters—one that shifted from one of the most violent conflicts of this year’s social unrest to a negotiated cease-fire.
On Thursday, police collected hundreds of Molotov cocktails, hauled out baskets of primitive weapons, supplies and other evidence and snapped photos of the wreckage that had befallen Hong Kong Polytechnic University following its lengthy occupation, and evacuation, by protesters.
Last week, the campus was the scene of one of the fiercest single front-line battles in more than five months of unrest. More than a thousand hard-line protesters armed with Molotov cocktails, slingshots and bows and arrows fought for more than 12 hours to keep police out of the barricaded university.
The demonstrators had turned the Hong Kong Polytechnic University into a fortress—raiding classrooms of furniture to seal off the entrances and transforming cafeterias into communal mess halls, a basketball court into sleeping quarters and student common rooms into rudimentary weapons factories.
Over the past week, those numbers dwindled as hundreds surrendered or were arrested making dashes for freedom. Others escaped on foot or the backs of motorbikes, by abseiling down ropes or through underground sewers.
The occupation marked the tensest days of a protest movement long haunted by fears of a Tiananmen-style crackdown—fueled by a police warning early last week that officers would use lethal force if attacked. In the end, a bid to de-escalate the standoff and get the youngest protesters out was a success, the first negotiated peace of the protest movement.
The standoff galvanized many others onto the streets in support, and was followed by the passage in U.S. Congress of an act to safeguard rights in the city, signed by President Trump on Wednesday.
And Sunday, a record number of voters turned out for local council elections, signaling their support for the protest movement by backing pro-democracy campaigners and giving them their biggest-ever win over establishment parties aligned with Beijing. The city has seen the calmest week in months, although a series of rallies are planned in the coming days.
Over the past week, police switched to a softer approach of coaxing out the holdouts, some of them high-school students. The wait-them-out policy saw those inside gradually walk out, many weary from lack of food or emotionally drained.
On Thursday morning, police finally entered the campus in an operation that Police Superintendent Louis Lau said was aimed at clearing weapons and gathering evidence of damage. They didn’t intend to search for protesters, Mr. Lau said, and any that they found would be encouraged to get medical help.
On both Wednesday and Thursday, the warren of buildings connected by zigzagged paths resembled a haunted castle. Alarm bells rang nonstop in one site. Graffiti was everywhere on the walls and grounds. At an open-air square, dozens of yellow and white helmets formed the letter S.O.S.
Evidence of a once thriving commune was everywhere: half-eaten cups of noodles, discarded black clothing, towering heaps of garbage and mottled maps noting the locations of meal stations, showers and police water cannons. Also visible were boxes filled with bottles of flammable liquids and laboratory chemicals—the remains of makeshift Molotov-cocktail factories. Two huge metal slingshots used to launch ordnance at police stood abandoned alongside piles of bricks.
Inside the university gym, blue and red yoga mats dotted the basketball floor between abandoned helmets and goggles. The blue-tiled swimming pool nearby where protesters had been testing Molotov cocktails was drained and pocked with black craters. Nearby, a stairway was blocked by a new brick wall, one of the several obstacles built up to slow down police.
Students first began streaming into PolyU as early as Nov. 11, as the young protesters overtook several universities across the city.
By Nov. 17, as demonstrators vacated other universities, PolyU emerged as the most significant front line—patrolled by protesters inside and ringed by police outside. Those entering were subjected to pat-downs and bag checks, said One PolyU faculty member who visited to retrieve some papers from her office.
“The mood to me felt purposeful, organized, determined,” she said.
Skirmishes with police intensified that evening, protesters threw a barrage of Molotov cocktails, bricks and other projectiles toward police, who made sorties backed by water cannon and tear gas but failed to overcome the defiant student’s defensive lines.
After police cleared the surrounding barricades and reclaimed the streets outside—laying siege to campus and blocking all exits, the early optimism of the occupiers gave way to despair. Many trapped inside sought escape routes and others grew increasingly fearful that police spies were in their midst.
Brian Wong, a Hong Kong Red Cross staffer who volunteered inside the school after the clash, said one shaken protester asked, “Could you hold my hands?” Persistent rumors spread that undercover police had infiltrated the campus.
“People just stopped hanging by the buildings that were rumored to be infiltrated by the police,” said another protester. He eventually escaped with several friends through a fence under cover of darkness, he said.
After two days of violent battles, a breakthrough came Nov. 19 when local legislators, police and parents of some holed up inside struck a deal: Protesters under the age of 18 could leave without being arrested if they provided their names and other identifying information.
Rev. Pang, a pastor who helped defuse the standoff, was among the first in. “The campus was just like a war zone,” he said.
As protesters’ numbers thinned, some ceased speaking with each other, those who visited said. Paranoia set in. “They wouldn’t tell each other where they were hiding,” said one Poly U alumnus who helped organize a team of volunteers to help those remaining to escape.
The alumnus, who asked to be identified only by his first name, Rick, said the volunteers were led by professionals in Hong Kong’s financial-services industry. Together they helped several dozen protesters escape last week—organizing drivers to speed off with protesters who sneaked out.
Those left grew more desperate, he said. While some were able to find ways out, police intercepted many. Some got away following a retreating firetruck, he said. Others sneaked past the police cordon during morning daylight hours when police were less attentive, he said.
The ensuing days saw increasing disorder—as those who remained went through food, water and other supplies. Garbage piled up. Kitchens grew filthy, bathrooms became increasingly hazardous and a moldy stench hung in the air.
Dr. Chiu, a dental surgeon who volunteered as a medic for four days in the university last week, set up a makeshift clinic where he and six other medics treated around 40 people—including one protester who had fallen from a third-floor balcony in a botched escape attempt.
“Their mental state was getting weaker every day,” Mr. Chiu said.
By Tuesday evening, just a handful remained inside the Poly U campus. Two pro-democracy legislators who made their way inside described an increasingly desperate scene among the few protesters left. Some suffered diarrhea, while others were eating only bread.
“They only come out to try to get food in the canteen,” legislator Gary Fan said that day.
By Thursday, dozens of police had packed the university grounds and begun a massive cleanup. Plainclothes officers began hauling away baskets of evidence—including one basket containing a quiver of arrows.
“Democracy!” shouted one officer, throwing up his hands and surveying the destruction. “Freedom!” He shook his head.
Rick, the volunteer, said he understood why the protesters wanted to occupy the universities, but he said PolyU turned out to be the wrong place for the standoff.
“Every movement in history started at a university,” he said. “PolyU is very dangerous. When all the roads were closed, they couldn’t run away.”
Write to Dan Strumpf at daniel.strumpf@wsj.com and Wenxin Fan at Wenxin.Fan@wsj.com