BERLIN — An Afghan migrant accused of raping and killing a medical student in Germany had been convicted of attempted murder in Greece and had violated parole there, but the German authorities were not aware of his criminal past when he entered the country, the government’s top security official said Thursday.

The news added a disturbing twist to a case that has already rattled the country, and it raised concerns about European officials’ ability to enforce laws within the 26 countries that allow for free travel across their borders.

“The course of events is very aggravating,” Thomas de Maizière, Germany’s interior minister, said of the discovery that the suspect had been convicted of a violent crime in Greece. Mr. de Maizière said Germany would take up the issue with the Greek government.

The suspect, whose identity and age have not been made public, was living with a foster family in Freiburg, a university city in southwestern Germany, at the time of his Dec. 3 arrest on suspicion of the rape and murder of the 19-year-old medical student, Maria Ladenburger, whose body was found in the Dreisam River in Freiburg on Oct. 17. Seven weeks later, the police said, the suspect was identified through DNA evidence from a strand of hair found near the crime scene.