A gunman opened fire on the main campus of Michigan State University last night, killing three people and injuring five, before an hours-long manhunt for the suspect ended with his death, apparently from a self-inflicted gunshot, police said.

The 43-year-old gunman had no known affiliation to the university, and his motive remained a mystery, police said at an early morning news briefing more than five hours after the violence began on the sprawling East Lansing campus, about 90 miles northwest of Detroit.

Details about the sequence of events remained sketchy, but Chris Rozman, interim deputy chief of the university police, said shots were fired in two locations - an academic building called Berkey Hall and the Michigan State University (MSU) Union building.

Police swarming the campus in response to the shooting, which began shortly after 8 pm local time, found victims at both locations, Mr Rozman told reporters at the televised briefing.

He said investigators had no information about the motive, adding that the university was not aware of any threats made to the campus before yesterday's bloodshed.

Mr Rozman said three victims were killed and five were taken to a hospital in the nearby city of Lansing, the state capital, all of them listed in critical condition.

Two of the dead were at Berkey Hall and the other at the MSU Union.

Interim deputy chief of the MSU police Chris Rozman addressing the media

Officials declined to provide any details about the victims, some of whose identities and relationship to the university were still being determined, Mr Rozman said.

The name and other information about the suspect were not immediately released, and police said they remained baffled by what precipitated the shooting.

"We have no idea why he came to campus to do this tonight," Mr Rozman told reporters.

The gunman was confirmed dead, from an apparently self-inflicted gunshot roughly four hours after the bloodshed had started, Mr Rozman said.

"There is no longer a threat to campus. We believe there to be only one suspect in this incident," he said.

Mr Rozman added that the suspect "was contacted by law enforcement off campus" at one point, adding, "that scene is being investigated as a crime scene."

Michigan State University students being led to a safe area by police

It remained unclear whether the gunman was found dead after he was confronted by police, or whether he may have taken his own life during such a encounter.

About an hour earlier, MSU police had released two still images of the suspect from surveillance video that showed him walking into a building, then mounting a short flight of stairs, wearing a jacket, a baseball cap and a black mask over his lowerface.

He was holding what appeared to be a pistol in one hand.

Students, faculty and residents in surrounding off-campus neighborhoods of East Lansing had been told by authorities to "shelter in place" during the manhunt.

That advisory was lifted once the suspect's death was confirmed.

'Go, go, go'

Local television news footage taken during the door-to-door search showed students filing past heavily armed police outside campus buildings in the cold night air, their arms raised above their heads in an "active shooter" evacuation ritual that has become commonplace on US school campuses.

MSU officials said that all classes and school activities would be canceled for 48 hours at the university's flagship East Lansing campus, a public academic centre with some 50,000 students, mostly undergraduates.

"We will take two days ... to give ourselves time to think and to grieve and to be together," MSU president Teresa Woodruff said.

The violence came roughly 14 months after a deadly mass shooting on 30 November 2021 at Oxford High School in Oakland County, Michigan, about 80 miles east of East Lansing, in which a 15-year-old student opened fire with a semi-automatic pistol.

Four classmates were killed and six students and a teacher were wounded in that attack, the deadliest US school shooting that year.

Authorities said the teenage suspect in the 2021 shooting, who has pleaded not guilty to murder charges, used a gun his parents bought him as a Christmas present despite signs that hewas emotionally disturbed.

Both parents were charged with involuntary manslaughter in the case.

Governor Gretchen Whitmer said on Twitter that she was being briefed on the East Lansing shooting.

Alexis Dinkins, an MSU sophomore who was inside Akers Hall, a dormitory on campus, told the Detroit News she heard people barricading doors and shouting, "Go, go, go" as the incident unfolded.

As she and other fled the dorm, they encountered police who told them to go to a nearby bus stop.

"We don't feel safe anywhere," the Detroit News quoted Dinkins as saying as she stood with a group of students on a campus sidewalk after leaving Akers.

She described the situation as "terrifying."