Police officers conduct a search at the University of California, Los Angeles (UCLA) campus after it was placed on lockdown following reports of a shooter that left 2 people dead in Los Angeles, California June 1, 2016.

LOS ANGELES — A murder-suicide at a UCLA engineering building Wednesday drew hundreds of heavily armed officers who swarmed the sprawling Los Angeles campus, where students close to summer break barricaded themselves in classrooms as best they could before being evacuated with their hands up.

About two hours after the first 911 call came in around 10 a.m., with the center of campus still saturated with officers, Los Angeles Police Chief Charlie Beck declared the threat over. Two men were dead in an office, and authorities found a gun and what might be a suicide note, he said.

Authorities did not identify the men, and a motive was not immediately clear.

The response to the shooting was overwhelming: Teams of officers in helmets and bulletproof vests who were looking for victims and suspects ran across the normally tranquil campus tucked in the city's bustling west side. Some with high-powered rifles yelled for bystanders to evacuate. Groups of officers stormed into buildings that had been locked down and cleared hallways as police helicopters hovered overhead.

Advised by university text alerts to turn out the lights and lock the doors where they were, many students let friends and family know they were safe in social media posts. Some described frantic evacuation scenes, while others wrote that their doors weren't locking and posted photos of photocopiers and foosball tables they used as barricades.

It was the week before final exams at University of California, Los Angeles, whose 43,000 students make it the largest campus in the University of California system. Classes were canceled Wednesday but would resume Thursday.

Olivia Cabadas, a 22-year-old nursing student, was getting ready to take a quiz in the mathematics building when her classmates began getting cellphone alerts. Through a window, they could see students rushing down the hallway.

An officer yelled that everyone should get out.

"It was just a little surreal — this is actually happening," Ms. Cabadas said. "It was chaos."

Those locked down inside classrooms described a nervous calm. Some said they had to rig the doors closed with whatever was at hand because they would not lock.

Umar Rehman, 21, was in a math sciences classroom adjacent to Engineering IV, the building where the shooting took place. The buildings are connected by walkway bridges near the center of the 419-acre campus.

"We kept our eye on the door. We knew that somebody eventually could come," he said, acknowledging the terror he felt.

Those in the room devised a plan to hold the door closed using a belt and crowbar and demand ID from anyone who tried to get in.

Tanya Alam, 19, also was in the same classroom with about 20 other students. She said she saw an alert on her phone that warned of police activity near Engineering IV. Then, several minutes later, an alert said there was an active shooter.

"I let that sink in. Then I realized there was a shooter on campus and Engineering IV is right here! So I said it out loud," she said.

The teacher's assistant told students to shut their laptops, turned out all the lights and switched off the projector. They were ordered to be quiet and got under their desks. Sitting on the ground, Ms. Alam cried.

Students were told to put their phones away, too, but no one did, she said. In the darkened room, the glow of screens illuminated many faces.

"On one hand, yes, this is an emergency. But on the other hand when your mother is calling from miles away ..." Alam said, trailing off.

Their entire classroom was finally allowed to leave. Students were greeted by a phalanx of SWAT team members but were not searched.

SWAT officers cleared occupants one by one at the mathematical sciences building. One man walked out with his hands up and was told to get on his knees. An armed officer searched him and his backpack, then sent him on his way with his hands still in the air.

___

This story has been corrected to report that the shooting happened in the Engineering IV building, not Boelter Hall.