The attacker had purchased two guns abroad, according to Mannheim police chief Siegfried Kollmar, who added that he could not say in which country the firearms were purchased, as it could impede the ongoing investigation.
The shooter, who reportedly used a rifle to carry out the attack, had no previous criminal record.
Authorities have ruled out a political or religious motivation for the shooting. Police have searched the assailant’s residence in the nearby city of Mannheim, but a motive has yet to be determined.
The shooting occurred around midday in Heidelberg. Four individuals were wounded and one later died from her injuries, according to the interior minister of the state of Baden-Wuerttemberg Thomas Strobl.
In the past 100 years there have been six school shootings in Germany - the last of which occurred at a secondary school in 2009.
Heidelberg University, established in 1386, is the oldest university in Germany, and one of the most prestigious universities in Europe. The city of Heidelberg has a population of approximately 160,000, of which about a quarter are students.