WESTWOOD, Calif. — A law enforcement official says the victim of a murder-suicide that locked down the University of California, Los Angeles for hours Wednesday morning was a mechanical engineering professor.

William S. Klug was gunned down in an engineering building office, an official with knowledge of the investigation but wasn't authorized to publicly discuss it told the Associated Press.

The shooting locked down the 419-acre campus for hours Wednesday, just as the university's semester was winding down and students were preparing for finals.

Police said gunfire erupted at Boelter Hall in the school's engineering complex, right in the middle of the campus. Reports came in about 10 a.m. local time.

The situation was contained two hours later and police said there was no threat on campus.

Colleagues of Klug described the married father of two as a kind, gentle person.

UCLA said the campus has reopened but classes are cancelled for the rest of the day. Classes will resume Thursday as scheduled.

Teams of armed law enforcement in tactical gear scoured the Southern California campus as the situation unfolds, according to aerial footage from PIX11's sister station KTLA. Dozens of marked police vehicles and teams from the FBI and the Bureau of Alcohol, Tobacco, Firearms and Explosives also responded.

Students and staff were ordered to stay where they were, barricade the doors and not let anyone inside, the school said.

Some 43,300 students are enrolled in the Los Angeles campus as of April, according to university data. This is the last week of classes at the school, with final exams scheduled to start June 6, according to the university’s online calendar.

The engineering school's senior class dinner was scheduled for Thursday night.

The shooter has not been identified.