A gunman killed a young woman and injured three others in a school shooting inside a lecture hall at the Heidelberg University in southwestern Germany on Monday, police said, adding that the perpetrator also died.
"A young woman died in hospital of her gunshot wounds," the sources said. "The perpetrator took his own life. Everything points to a lone perpetrator."
German media reported that the gunman appeared to have no religious or political motive.
"A lone perpetrator injured several people in a lecture hall with a long gun. The perpetrator is dead," Mannheim police said in its initial statement.
Four people were "seriously injured" in the attack, police said. The suspect then fled outdoors.
Police sounded the all-clear but gave no details on how the attacker died.
More details are expected at a press conference on Monday evening.
The shooting triggered a major police operation at the university's Neuenheimer Feld campus, with police on Twitter urging people to steer clear of the area "so that rescue workers and emergency services can travel freely."
Police said they were "not aware of any letter claiming responsibility" for the attack and called on the public to avoid speculating.
Heidelberg is a picturesque university town in the state of Baden-Wuerttemberg, home to a population of around 160,000 people.
Heidelberg University, founded in 1386, is Germany's oldest university and one of the top-ranking in Europe.
The university's Neuenheimer Feld campus, on the northern bank of the Neckar river, hosts natural sciences departments, part of the university clinic as well as a botanical garden.
Students were asked to stay away from the campus in an email from the university, local broadcaster SWR reported.
The university only resumed in-person classes in October after months of distance learning because of the coronavirus pandemic.
Students have to show they are vaccinated against COVID-19, recovered or in possession of a recent negative test if they want to enter university buildings.
Germany has been hit in recent years by a spate of attacks, mostly perpetrated by extremists or far-right militants.
School shootings, however, are relatively rare in Germany, a country with some of the strictest gun laws in Europe.
In 2009, a gunman killed nine students, three teachers and three passers-by in a school shooting at Winnenden, also in Baden-Wuerttemberg. He then killed himself.
In 2002, a 19-year-old former student, apparently in revenge for having been expelled, gunned down 16 people, including 12 teachers and two students at a school in the central German city of Erfurt. He, too, then killed himself.
Both mass shootings were carried out with legal weapons and spurred Germany to tighten its gun laws.
The country currently requires anyone younger than 25 to pass a psychiatric exam before applying for a gun license.
In another incident in 2016, nine people were killed when gunman David Ali Sonboly went on a rampage in a shopping center in Munich.
The shooting sparked renewed debate about whether Germany should further curb gun ownership.