Updated

A former UCLA graduate student killed his estranged wife in Minnesota before driving to Los Angeles and murdering one of his former professors before turning the gun on himself, authorities said Thursday.

The body of Ashley Hasti, 31, was found early Thursday in her home in Brooklyn Park, northwest of Minneapolis. Hennepin County records confirmed the gunman, Mainak Sarkar, married Hasti in June of 2011.

Los Angeles Police Chief Charlie Beck said Thursday that Hasti's name was on a "kill list" composed by Sarkar. The list also named William Klug, a mechanical engineering professor who died in the Wednesday morning shooting on the Westwood campus, and another engineering professor who was unharmed. Authorities did not identify the second professor.

Hasti's grandmother, Jean Johnson, told the Minneapolis Star-Tribune the two only remained together for about a year, but didn't get a divorce because Hasti couldn't afford one.

"They just didn't get along," Johnson told the paper. "The only enemy she had was him, I guess. I never thought he would do something like that."

Authorities pieced together the case as most classes resumed a day after thousands of students and staff members were locked down on the sprawling grounds of UCLA. Its normally tranquil paths and hallways were swarmed by a small army of officers clad in body armor and wielding high-powered rifles.

The investigation unfolded rapidly based on a note Sarkar left in the office where he killed Klug. It mentioned the second professor and asked anyone who read it to check on Sarkar's cat in St. Paul, Minn.

At Sarkar's apartment, authorities found his list of three planned targets, which led them to Brooklyn Park and Hasti's body. 

Gordy Aune Jr., who lives three doors away and is the neighborhood watch commander, told the AP Hasti lived with her father. He said his neighbors were quiet and kept to themselves.

Sarkar had disparaged Klug online and the professor knew of his contempt, but police have not uncovered any death threats, Beck said. The writings contained "some harsh language, but certainly nothing that would be considered homicidal," he said.

A blog post written in March by someone identifying himself as Sarkar asserted that Klug "cleverly stole all my code and gave it (to) another student" and "made me really sick."

The blog continues: "Your enemy is your enemy. But your friend can do a lot more harm. Be careful about whom you trust. Stay away from this sick guy."

Beck said it was Sarkar who was mentally unstable. The chief cited conversations in which UCLA officials told investigators the former Ph.D. student's claims of stolen code are "a making of his own imagination."

Sarkar, 38, and Klug, 39, were once close. In his 2013 dissertation about using engineering to understand the human heart, the student thanked the professor "for all his help and support. Thank you for being my mentor."

Authorities believe Sarkar drove to Los Angeles in the past few days with two handguns he legally bought in Minnesota. With the weapons and ammunition Sarkar carried, "he could have caused many more fatalities than the one," Beck said.

At Sarkar's apartment building in St. Paul, the only people who would open their doors Thursday said they didn't know their neighbor and that police had been there Wednesday night.

Sarkar's LinkedIn page shows he obtained a master's degree at Stanford University after graduating in 2000 from the Indian Institute of Technology at Kharagpur with a degree in aerospace engineering.

He most recently was listed as an engineering analyst at a Findlay, Ohio, company called Endurica. Company president Will Mars said Sarkar left in August 2014.

It's unclear what he had been doing since.

The Associated Press contributed to this report.

Click for more from Fox9.com.