Several people were injured during the shooting at Heidelberg University.
CNN  — 

One woman was killed and three others injured after an 18-year-old man opened fire on students in a lecture hall at Heidelberg University in southwestern Germany on Monday, according to police.

The lone gunman, who was a student at the university, entered an auditorium filled with 30 people at around 12:24 p.m. local time (5:24 p.m. ET) according to CNN’s German affiliate n-tv. After firing several shots, he fled the auditorium and then turned a gun on himself, police said.

At 12:51 p.m. the alleged perpetrator was found dead by police. He had two rifles with him.

Siegfried Kollmar, the chief of police of Mannheim, a nearby city, said that four women had been wounded in the shooting. A 23-year-old female German student who was shot in the head died in the hospital hours later, and three other young German women sustained injuries in the attack, authorities said.

Police officers examine a weapon on the campus of Heidelberg University after the shooting.

The shooter lived in Mannheim, and had announced his plan in a WhatsApp message directly before the attack, Kollmar said.

In the message, the gunman said that “people should be punished” and that he wanted be buried at sea rather than in a cemetery, according to police.

The chief prosecutor for Heidelberg, Andreas Herrgen, said that the gunman was unknown to authorities prior to the shooting. He did not have a firearms license and appeared to have purchased the rifles outside of Germany.

Investigators have not released any information about a possible motive.

Police in Mannheim said 400 police officers were on the scene following the incident.

Heidelberg University is Germany’s oldest, according to its website.