A nationalist party has seized on the death to argue that Merkel's government bears a share of the blame.
"If it turns out that (the perpetrator) was an Afghan refugee then that needs to be condemned, absolutely, just like with any other murderer," Merkel said in an interview with public broadcaster ARD.
"But that shouldn't be combined with a rejection of an entire group, just like we don't draw conclusions about an entire group from (the actions of) one person in other instances," she added.
Police say the suspect, who was arrested on Friday, was linked to the crime through DNA evidence and video footage from near the scene. The teenager, who entered Germany last year as an unaccompanied minor, hasn't made a statement. His arrest, however, has played into ongoing tensions about the arrival in Germany last year of hundreds of thousands of migrants.
More From This Section
Joerg Meuthen, a co-leader of the nationalist Alternative for Germany party, argued Sunday that Merkel and Vice Chancellor Sigmar Gabriel bear "a decisive share of the responsibility for this cruel act and many other 'isolated cases' that have happened daily in Germany since the unhindered entry of illegal immigrants."
Merkel's deputy said the student's death must not be used for "rabble-rousing and conspiracy propaganda."
"It is clear to everyone that refugees can commit equally terrible crimes as people born in Germany," Gabriel told yesterday's edition of the Bild daily.
Merkel's spokesman, Steffen Seibert, condemned the "appalling crime," telling reporters in Berlin that "the perpetrator must be punished with the full force of our laws." While many Germans have welcomed refugees, there has been strong opposition from a vocal minority.