IRVINE, California (Reuters) -Police on Wednesday appeared to take back control of a lecture hall from pro-Palestinian protesters who for several hours occupied a building at the University of California, Irvine, a university spokesperson said.

Officers from about 10 nearby law-enforcement agencies converged on the campus after university officials requested help, said Sergeant Karie Davies, spokesperson for the Irvine Police Department.

Police would not release the number of arrests until the operation was over, Davies said, but she confirmed some people had been handcuffed.

"The police have retaken the lecture hall," UC Irvine spokesperson Tom Vasich said by telephone. "I do not have confirmation of it, but I do see police officers up in the second-floor balcony and around the front of the building."

Banners that the demonstrators had hung from the balconies were taken down, Vasich said.

The university declared the takeover a "violent protest" shortly before 3 p.m. PDT (2300 GMT) and the building appeared to have been retaken less than four hours later.

The demonstration at Irvine, about 40 miles (65 km) south of Los Angeles, is the latest in a series of campus protests across the United States over the war in Gaza in which activists have called for a ceasefire and the protection of civilian lives while demanding universities divest from Israeli interests.

UC Irvine protesters had established an encampment adjacent to the lecture hall on April 29 similar to those at other universities that have led to mass arrests and clashes with police elsewhere in the country.

On Wednesday 200 to 300 protesters took over the lecture hall at a time when no classes were in session, Vasich said.

Police responded in riot gear and formed a barricade while an officer on a loudspeaker warned the crowd that they had formed an unlawful assembly and risked arrest if they remained, the Orange County Register reported.

Video on social media showed students chanting slogans, banging drums and hoisting banners, with rows of police standing nearby. One banner hung from the building declared the site "Alex Odeh Hall," in honor of a Palestinian activist who was killed in a 1985 office bombing in the nearby city of Santa Ana.

Four nearby research buildings with potentially hundreds of people inside were locked down, and those inside were instructed to shelter in place, Vasich said, though the university later altered that instruction and instead advised them to leave.

Chancellor Howard Gillman has said the university has been in talks with students since the encampment was set up but has been unable to reach an agreement to find an "appropriate and non-disruptive" alternative site.

Gillman has said the university cannot selectively decide against enforcing rules against encampment and that "The University of California has made it clear it will not divest from Israel."

"Encampment protesters have focused most of their demands on actions that would require the university to violate the academic freedom rights of faculty, the free speech rights of faculty and fellow students, and the civil rights of many of our Jewish students," Gillman said on Monday.

(Reporting by Daniel Trotta in Carlsbad, California, and Mike Blake in Irvine; editing by Don Durfee, Diane Craft and Gerry Doyle)

By Daniel Trotta and Mike Blake