The shooter in an apparent murder-suicide at UCLA was identified Thursday as Mainak Sarkar, a student who got his Ph.D from the university's engineering program who blogged about how much he hated the professor who was killed.
His victim was UCLA professor William Klug, multiple law enforcement sources said. Los Angeles police did not immediately release a motive in Wednesday's shooting, which happened in a small office in the engineering building, Los Angeles Police Chief Charlie Beck said.
But sources told NBC News Sarkar had posted disparaging comments online about Klug, calling him a "very sick person" who stole computer code from him.
“William Klug, UCLA professor is not the kind of person when you think of a professor. He is a very sick person. I urge every new student coming to UCLA to stay away from this guy," Sarkar posted on a now-deleted blog called "the longdarktunnel" in March, the sources said.
"My name is Mainak Sarkar. I was this guy’s PhD student. We had personal differences. He cleverly stole all my code and gave it another student," the comment read. "Be careful about whom you trust. Stay away from this sick guy.”
The post included a photo of Klug, who has been described since his killing as easily approachable, humble, and intelligent.
California Lt. Gov. Gavin Newsom said in a tweet that Klug was a husband, father of two and "brilliant" teacher.
Klug was also a volunteer Little League coach on his son's team.
At least three shots were fired and a gun was recovered from the scene of the crime, Beck said. A note was found near the bodies, but police didn't know if it was a suicide note.
"I don't know if it's a suicide note. I don't know if it's a confession. I don't know what it is," Beck said.
The campus was put on lockdown for several hours after the shooting, which happened about 10 a.m. (1 p.m. ET). Hundreds of officers and agents swarmed the campus, working with the FBI and the Bureau of Alcohol, Tobacco, Firearms and Explosives, UCLA Police Chief Jim Herren said.
The lockdown was lifted just after noon. A nearby hospital and three elementary schools were also put on lockdown.
Classes, which were canceled for the day, resumed Thursday except in the engineering school, said Scott Waugh, UCLA's executive vice chancellor and provost.
"We want to resume the normal operations of the campus quickly," Waugh said Wednesday.
Students were in the midst of finals week at UCLA, which has a quarter system for its academic calendar. Bahjat Alirani, a senior, told NBC News he was in the engineering building for an exam when he ran into a police officer.
"He was pointing a big gun and said for everyone to run and get out of the area," Alirani said.
The shooting bookended a school year at UCLA that started with violence, too. In September, fourth-year psychology student Andrea DelVesco's body was found in a burning apartment a block from campus. Two men were charged in her death.
President Barack Obama was briefed aboard Air Force One about the incident, White House spokesman Josh Earnest said.