Unknown attackers fired automatic rifle shots at the German ambassador's residence in Athens on Monday but caused no injuries, police said.
The shooting happened at around 3:30 am (0130 GMT) when German ambassador Wolfgang Dold was inside the residence in the north of the Greek capital.
There was no immediate claim of responsibility for the attack, which occurred as Greece prepares to take over the six-month rotating presidency of the European Union on Wednesday.
Anti-German sentiment has been on the rise in Greece in recent years over EU paymaster Germany's perceived role in pushing for severe austerity measures in return for the country's 240-billion euro ($330 billion) bailout.
Athens "strongly condemns this cowardly terrorist act whose only aim is to degrade Greece's image abroad a few days before it takes charge of the European Union presidency", said a statement by Greek Foreign Minister Evangelos Venizelos.
A police officer guarding the site said he saw a group of four people firing the shots.
Another man on the scene, who identified himself as a neighbour, claimed he witnessed the attack from inside his home.
"There were four persons, but only one of them wielded a gun...it was as if he was tutoring the others on how to do it," he told reporters.
"They were not there to kill. Not a single bullet was aimed at the guard post" outside the residence, the man said.
Police recovered around 60 spent casings from the residence's courtyard. They said the bullets were fired from two separate Kalashnikov rifles and that damage to the building was minor.
Four bullets were found to have hit the front of the residence, the police said.
Prime Minister Antonis Samaras and Public Order Minister Nikos Dendias spoke to the ambassador by telephone after the incident.
German Foreign Minister Frank-Walter Steinmeier expressed relief no-one was hurt but said Berlin took the attack "very seriously".
"Nothing, absolutely nothing, can justify such an attack on a representative of our country," he said in a statement.
"But the perpetrators will not succeed in breaking the good relations between Germany and Greece and between the German and Greek people."
He thanked the Greek government for its quick response and said "they have assured us that security measures on the ground will be strengthened and everything done so that those responsible be identified and brought to justice".
Attacks against diplomatic targets, banks and foreign companies are regular occurrences in Greece. They are often blamed on far-left or anarchist groups and in most cases only cause material damage.
The German ambassador's residence in the Athens suburb of Halandri was also the target of a rocket attack in 1999, in an incident claimed by the extremist left-wing November 17 group, which has since been dismantled.