HONG KONG—A standoff between protesters and police at a university here extended into a second night, with police keeping the area on lockdown while refraining from using the lethal force they had threatened, as increasingly militant antigovernment activists battled back.

Late Monday, police allowed a group of high-school principals to enter the Hong Kong Polytechnic University campus after a group of self-appointed mediators—including the former head of the city’s legislature Jasper Tsang—were allowed inside. They said they had an understanding with police to allow those 18 years of age and under to leave without being immediately arrested. The principals emerged early Tuesday with a group of about 30 students, while dozens more began to come out peacefully.

The principals told reporters they understood that authorities would record the identities of students under 18, though police could decide to take legal action at a later date. Police and government officials have urged protesters to give themselves up peacefully for arrest.

About 100 protesters remain on campus, Chief Executive Carrie Lam said Tuesday. A third of the 600 people who have left PolyU are under 18 and were let go without being arrested. The rest——around 400 people——are adults and were arrested, she said.

Police on Monday afternoon fired tear gas, pepper bullets and water cannon at dozens of black-clad protesters who jumped railings and tried to flee the campus, driving many back in. Scuffles broke out as protesters hurled bricks while holding umbrellas for cover.