EAST LANSING, Mich. (AP) — Police identified the 43-year-old man who killed three students and wounded five at Michigan State University, saying Tuesday that a tip from the public led to a confrontation with officers miles from campus where the gunman fatally shot himself.

Investigators still were sorting out why Anthony McRae fired inside Berkey Hall and the MSU Union — a popular place for students to eat and study — shortly before 8:30 p.m. Monday. The shootings led to a campus lockdown and a manhunt that ended roughly three hours later.

“We have absolutely no idea what the motive was,” said Chris Rozman, deputy chief of campus police, adding that McRae was not a student or Michigan State employee. He said police confronted McRae before he killed himself.

WATCH: How the trauma of mass shootings fundamentally change American communities

The dead and injured all were students, Rozman said. Five remained in critical condition at Sparrow Hospital, said Dr. Denny Martin, who fought back tears during a news conference.

“Our Spartan community is reeling today,” Gov. Gretchen Whitmer, a Michigan State graduate, said at the briefing.

President Joe Biden pledged his support during a phone call, she said.

“We mourn the loss of beautiful souls and pray for those continuing to fight for their lives. … Another place that is supposed to be about community and togetherness shattered by bullets and bloodshed,” Whitmer said.

Michigan State has about 50,000 students, including 19,000 who live on campus. As hundreds of officers scoured the East Lansing campus, about 90 miles (145 kilometers) northwest of Detroit, students hid where they could Monday night.

Dominik Molotky said he was learning about Cuban history around 8:15 p.m. when he and the other students heard a gunshot outside the classroom. He told ABC’s “Good Morning America” that a few seconds later, the gunman entered and fired three to four more rounds while the students took cover.

“I was ducking and covering, and the same with the rest of the students. He let off four more rounds and when it went silent for about 30 seconds to a minute, two of my classmates started breaking open a window, and that took about 30 seconds to happen. There was glass everywhere,” Molotky said.

“After that, we broke out the window and I climbed out of there, and then I booked it back to my apartment,” he said. He was unsure whether gunfire hit any of the students.

Claire Papoulias, a sophomore, described on NBC’s “Today” how she and other students scrambled to escape a history class out a window after the gunman entered through a back door and began firing.

“There was a boy in my class, and he was waiting outside the window, and he was catching people and helping people down,” she said. “As soon as I fell out of the window I kind of hit the ground a little. I just grabbed my backpack and my phone, and I remember I just ran for my life.”

Ryan Kunkel, 22, was attending a class in the Engineering Building when he became aware of the shooting from a university email. Kunkel and about 13 other students turned off the lights and acted like there “was a shooter right outside the door,” he said.

“Nothing came out of anyone’s mouth” for over four hours, he said.

Ted Zimbo said he was walking to his dorm when he encountered a woman with a “ton of blood on her.”

“She told me, ‘Someone came in our classroom and started shooting,’” Zimbo told The Associated Press. “Her hands were completely covered in blood. It was on her pants and her shoes. She said, ‘It’s my friend’s blood.’”

Zimbo said the woman left to find a friend’s car while he returned to his SUV and threw a blanket over himself to hide for three hours.

All classes, sports and other activities were canceled for 48 hours.

Interim university President Teresa Woodruff said it would be a time “to think and grieve and come together.”

“This Spartan community — this family — will come back together,” Woodruff said.

READ MORE: 5 years after massacre, Parkland families continue honoring lost loved ones with charitable work

The shooting came a day before the fifth anniversary of the Parkland, Florida, school shooting that killed 17 and is the latest in what has become a deadly new year in the U.S.

Dozens of people have died in mass shootings so far in 2023, most notably in California, where 11 people were killed as they welcomed the Lunar New Year at a dance hall popular with older Asian Americans.

In 2022, there were more than 600 mass shootings in the U.S. in which at least four people were killed or wounded, according to the Gun Violence Archive.

Kusmer reported from Indianapolis. Associated Press writers Ed White and Corey Williams in Detroit contributed to this story.

ncG1vNJzZmivp6x7sa7SZ6arn1%2Bjsri%2Fx6isq2eelsGqu81oamarpKqxprrTrGSdnZGZeqKy056pZqWZmLWqs8CnZKyskamybsHNoq2eqqOewbp50qGmqKyZo7Q%3D