The home of Germany's ambassador to Greece was sprayed with gunfire from automatic weapons on Monday morning, in a suspected terrorist attack the government said was aimed at hurting the country's image before it takes over the presidency of the European Union. No one was hurt.

Anti-terrorism police cordoned off streets around the official residence of Wolfgang Dold following the pre-dawn shooting on a busy road in the Halandri area of the capital. They recovered more than 60 bullet casings from the scene.

No group has claimed responsibility for the attack. Six people were briefly detained for questioning and released without charge while investigators examined video from surveillance cameras as well as a stolen car found near the scene of the shooting, police said.

Lead bailout lender Germany is often the subject of strong criticism in Greece, which is suffering through a sixth year of recession and tough austerity measures imposed as a condition of the country's international rescue loans.

On Monday, Greece's prime minister, Antonis Samaras, and his foreign minister telephoned the ambassador following the attack. The government said it was intended to tarnish the country's reputation during its 1 January to 30 June presidency of the EU.

"The Greek government expresses its outrage and outright condemnation of today's cowardly terrorist action which had the only apparent and objective of (damaging) Greece's image abroad … The perpetrators will soon be brought to justice," the foreign ministry said.