Dozens of protesters remain holed up at a university in Hong Kong surrounded by police as a days-long standoff appears to be coming to an end.

Police said that by 11pm on Tuesday almost 800 people had left the Polytechnic University, the site of one of the most prolonged and tense confrontations since the demonstrations in the city began five months ago.

Riot police have surrounded the red-brick campus since Sunday, firing teargas, rubber bullets and a water cannon at groups who tried to escape. Police urged the activists to surrender peacefully.

About 10 protesters tried to escape at about 10pm and were chased by police. Earlier, another group left with medics.

Six hundred activists surrendered late on Monday after two representatives negotiated with police. Three hundred of them were children and were not arrested but could be subject to further investigation, officials said.

Social workers who left the campus on Tuesday night said between 30 and 50 people remained. Most were searching for ways to escape and fewer than a dozen were determined to stay. Several were hiding in buildings around the site.

Morale among those left at the university was poor, according to Kevin Chiu, 34, a social worker who left the building at about 11pm. He described the mood as “hopeless”. He and his colleagues had been trying to persuade the group to leave. “It’s not easy to talk to them. They think we are bad guys to ask them to leave,” he said.

Police maintained a cordon around the campus in the early hours of Wednesday, and police vans and ambulances waited to take protesters away. A small group of bystanders waited just outside the cordon looking at the police.

Yan Ling, 50, was one of four people still waiting outside. She had been there since midday. “There aren’t many people left and we think [the police] may storm the campus. If we aren’t here we don’t know where they will be taken. If people are here, maybe they will treat them better,” she said.

Yan also stayed to accompany a couple who believed their 20-year-old son may still be inside. They lost contact with him earlier that day and they planned to stay until daylight if necessary. “We have no other choice,” the father said, who asked not to give his name.

Parents have been reluctant to say they are waiting for their children inside, out of concern that police will take down their information and use it against them.

“The last six months have been awful,” the woman said. “Everyone in Hong Kong is heartbroken,” said another woman, who had been waiting outside the university for the past two days but would not say whether she knew anyone inside.

Tens of thousands of people have taken to the streets over the past three days in an attempt to reach those in the university, prompting clashes with riot police. Police said they had arrested 1,100 people since Monday.

Hong Kong’s Hospital Authority said it had received almost 300 injured people from the university, and it asked the public not to come to the accident and emergency departments unless absolutely necessary.

Hong Kong’s chief executive, Carrie Lam, in her first public remarks since the crisis began on Sunday, said the government had reached an understanding with the police to resolve the incident peacefully.

She said she was shocked that campuses had been turned into “weapons factories”, and said police would have to take “necessary action” to deal with violent protesters.

Late on Monday, dozens of protesters were seen abseiling from a footbridge and being driven away on motorbikes. Police said they stopped 37 people from that group, including the drivers, who were arrested for “assisting offenders”.

Others tried to flee by crawling through manholes into sewers, before firefighters arrived on the scene to warn them it was unsafe.

Facebook Twitter Pinterest A protester tries to escape through a manhole into a sewage tunnel inside the Polytechnic University campus. Photograph: Adnan Abidi/Reuters

Beijing has issued increasingly severe warnings over the protests, prompting fears of intervention. After a Hong Kong court ruled that a ban on face masks was unconstitutional, China’s top legislature said only it had the power to rule on the constitutionality of legislation under the city’s basic law.

China’s ambassador to Britain, Liu Xiaoming, said on Monday the Hong Kong government was “trying very hard to put the situation under control. But if the situation becomes uncontrollable, the central government would certainly not sit on our hands and watch. We have enough resolution and power to end the unrest.”

Q&A Why have universities become a flashpoint in the Hong Kong protests? Show Hide Hong Kong’s protest movement has evolved throughout the five months it has raged in the harbour city. Its latest phase is being played out on Hong Kong’s university campuses — traditionally sites of political activism — some of which have been transformed into makeshift fortresses by demonstrators in the past fortnight. The immediate trigger for the campus confrontations appears to have been the death on 8 November of a Hong Kong University of Science and Technology student. Since then, several campuses have been barricaded by students, some of who are using footbridges or or near the campuses to block roads. At least three campuses are blockaded, including the Hong Kong Polytechnic University, close to the cross-harbour tunnel — a key artery for traffic in the city, and one that authorities will be determined to keep open.

The campus protests have been desperate: activists are using petrol bombs, bamboo poles and other weapons including javelins and bows and arrows. Observers have told the Guardian the shift to campuses represents a major escalation. Many of those occupying the campuses are students or alumni, and until recently, riot police have refrained from entering universities. “The university is the home turf of the students,” Ho-Fung Hung, a professor in political economy at Johns Hopkins University, has told the Guardian. “There is this notion of academic freedom and the university as a bastion of free ideas, this notion of autonomy. To people, this should not be breached by authorities.”

An English-language editorial in the state-run Global Times on Tuesday said: “The rule of law can save Hong Kong, but the premise is that the rioters must be punished. The mob’s terror-like violence is bound to be punished.”

Several trains connecting mainland China with Hong Kong have been suspended for Tuesday and Wednesday.

Hong Kong’s new police chief, Chris Tang, took office on Tuesday with a warning that “fake news” was undermining the reputation of his 30,000-strong police force and called for the city’s citizens to help end the turmoil.

Facebook Twitter Pinterest A protestor and a police officer confront each other during a demonstration on Tuesday. Photograph: Fazry Ismail/EPA

Jasper Tsang, a pro-Beijing politician and former head of Hong Kong’s legislative council who helped mediate the surrender of students on Monday, told Reuters there could be bloodshed if the police entered the Polytechnic University campus by force, where they were likely to meet strong resistance. “This is something that we want to avoid,” he said.

Police said on Tuesday they had found about 3,900 molotov cocktails at another university taken over last week by protesters, which had since been evacuated. Police said there were probably more than that figure at Polytechnic University.

Police said they had allowed Red Cross volunteers and first aiders as well as secondary school principals, teachers and social workers to enter the university.

Parents and protesters held rallies on Tuesday afternoon calling for police to let the protesters leave without threat of arrest. Eva Lau, 51, said she had not slept more than a few hours in the past two nights after she lost contact with her 22-year-old son on Sunday. At 3am on Monday she went to the university hoping to find him but police told her to leave.

She said her son had been in touch and he had left the campus on Tuesday with paramedics and was in hospital, but Lau had not been able to reach him because of road blockades set up by police in response to the protests.

“Every day from morning until night, we didn’t know what is going to happen and we were very worried. Now it’s a little better but I still have not seen him,” she said.

“I just hope to help these kids. They are afraid to go out and be captured by the police … They say they would rather die than come out.”