UCLA students went to school Wednesday expecting to take on routine end-of-school-year tasks: final exams and presentations. But those concerns were forgotten around 10 a.m., when cellphones buzzed to life across campus, announcing that a shooting had taken place.

Within minutes, thousands of students found themselves racing for cover, building makeshift barricades against classroom doors that wouldn’t lock and arming themselves with anything they could find as information about the gunfire — some of it rumor about a wave of assailants — spread across campus via text messages and social media.

In the end, it was a murder-suicide involving two men inside an engineering building near the campus’ south side, Los Angeles Police Chief Charlie Beck said.

Several sources identified the victim as William S. Klug, 39, a professor of mechanical and aerospace engineering who studied the interaction between mechanics and biology and was the father of two young children.

Klug, 39, an associate professor of mechanical and aerospace engineering, was described as both brilliant and kind, a rare blend in the competitive world of academic research, colleagues said.

“I am absolutely devastated,” said Alan Garfinkel, a professor of integrative biology and physiology who worked with Klug to develop a computer-generated virtual heart. “You cannot ask for a nicer, gentler, sweeter and more supportive guy than William Klug.”

Melissa Gibbons, one of Klug’s former Ph.D. students, said he was an exceptional mentor. She recalled that Klug noticed another student struggling in his finite element modeling class and asked Gibbons to tutor her. “He didn’t want to see her fail. To care that much in an undergraduate class says a lot about his character,” she said.

Klug, an El Segundo resident who was married with two young children, loved surfing and frequently took his family to Los Angeles Dodgers games. He earned his undergraduate degree in engineering physics from Westmont College in 1997, his master’s degree in civil engineering at UCLA in 1999 and his Ph.D. in mechanical engineering from the California Institute of Technology in 2003.

With school shootings so often in the news in recent years, many UCLA students feared that the situation unfolding on their normally serene campus might evolve into something far deadlier.

“It’s unfortunate it happened here,” said Andrew Avelino, 23, a senior majoring in history. “You see school shootings happening on the news at high schools, on other campuses, at other places. But you never thought it would happen here until it does.”

The wave of panic and adrenaline, slew of campus alerts and swarms of police were all too familiar for Jeremy Peschard. The 22-year-old geography major transferred to UCLA from UC Santa Barbara, near where a student’s rampage left six people dead and 14 injured in Isla Vista in 2014.

“It’s crazy to go through this again,” said Peschard, who said he experienced flashbacks of the attack as he hid inside a UCLA office. “It’s sad that it’s normalized at this point. It’s like I almost know the drill.”

Wednesday’s shooting took place inside the university’s engineering complex in a small office, according to Beck, who confirmed at a noon news conference that the shooter was one of the two dead men.

“The campus is now safe,” he said.

Authorities did not identify the victims and a motive was not immediately clear. Andy Neiman, the LAPD’s chief spokesman, confirmed a note was found at the scene, but investigators had not determined whether it was connected to the shooting.

Based on the appearances of the deceased, police believed that a professor was shot by someone young enough to be a student, who then turned the gun on himself, a law enforcement source also told the Los Angeles Times.

Los Angeles City Councilman Paul Koretz, whose district includes UCLA, said LAPD officers had told him it appeared “a professor was the victim” and that little was known about the shooter.

When police first discovered the two men who had been fatally shot, they feared they were the first victims of an active shooter, Koretz said.

“We’re at a point in this country where there’s some kind of small massacre every day, somewhere,” he said.

The campus was locked down for about two hours, ending around 12:05 p.m. Classes were canceled after the shooting but will resume Thursday, the university said.

The shooting prompted a massive response from local and federal law enforcement. Police officers in riot gear ran across campus, guns and battering rams drawn, while students exited buildings with their hands above their heads.

Neiman said the first 911 caller reported at least three gunshots and possible victims. A number of additional 911 calls and social media postings suggesting there was an active shooter led police to send hundreds of officers toward Westwood.

“It’s much easier to tell people it’s OK to come out, than to have to go and tell their families that they’re not coming home,” Neiman said.

Students hid in buildings across campus. Many said they struggled to lock the doors of the classrooms where they sought shelter and were forced to use their belts, nearby projectors and furniture to barricade themselves against any potential threat.

While Beck said there were no other suspects, many students said they received mass text messages and social media blasts announcing that as many as four shooters may have been roaming the campus.

”There’s a ton of information spreading over social media and group messages and it’s hard for everyone to sort out what is true and what isn’t,” Rafi Sands, vice president of UCLA’s student government, said as he hid with 30 other students inside Haines Hall during the lockdown. “They are saying there are multiple shooters, one near here.”

Christos Kampouridis, 23, said he found the door to his engineering class inside Boelter Hall locked at 9:50 a.m., then turned to find a man with a gun walking through a nearby hallway. The man, who had a rifle at his side and appeared to be wearing a tactical belt, yelled, “Come here.”

Kampouridis said he fled immediately, and shouted at nearby students to run. He burst out of the building and called 911, then began sending messages to friends and posting social media updates urging them to “stay away from Engineering.”

He was unsure whether he saw a police officer or the gunman, but wanted desperately to warn friends either way.

While some students rode out the lockdown hidden behind barricades, others desperately tried to flee the campus after they were unable to find shelter.

Maria Shafer said she ran out of her Spanish final in the Public Affairs building after the campus issued the first shooting alert. Shafer and about 20 other students ran into several locked doors as police sirens blared and helicopter roared overhead. They ended up climbing over bushes and sprinting across Sunset Boulevard before they found safety in the yard of a Bel-Air home.

“We didn’t know where to go, we were trying to get as far away from campus as possible,” she said. “The scariest part was running through the campus after we had gotten that alert.”

Mehwish Khan, 21, said she ran to the Charles E. Young Research Library, where many other students were hiding. Around 10:45 a.m., she and others had barricaded themselves in a restroom where they texted family and friends who were all giving different information about possible shooters.

“We are getting messages from all over,” she told a Times reporter in a text message.

Many students spoke with reporters only via text to adhere to UCLA protocol that asks students not to speak on their phones in such situations, they said.

Sands, 20, of Oakland, said it took several minutes for people on campus to realize the seriousness of the situation.

“We get a lot of Bruin Alerts for small things,” he said. “It took a while for everyone to realize this is serious.”

Nick Terry, a 29-year-old architecture student who was driving to UCLA from Silver Lake when he heard about the shooting, said he was more angry than scared.

“It just seems so pointless,” he said. “Two days left of school and it’s going to end on this note?”

———

(Times staff writers Sonali Kohli, Ruben Vives, Richard Winton, Brittny Mejia, Angel Jennings, James Queally and Joseph Serna, and Times Community News staffer Alene Tchekmedyian, contributed to this report.)

———

©2016 Los Angeles Times

Visit the Los Angeles Times at www.latimes.com

Distributed by Tribune Content Agency, LLC.