ONE evening in September 2011, Ali Rahimi, a 27-year-old Afghan asylum seeker, was hanging around with friends outside his building in central Athens when more than a dozen Greeks approached. Several men set upon Mr. Rahimi, one with a knife. Panicked, he fled into his apartment and fought back, managing to push the men out the door. He found blood gushing from just above his heart, one of five stab wounds in his back and chest.

Mr. Rahimi survived and is staying put for now. But his friend, Reza Mohammed, who was also injured in the attack, is considering what was once unthinkable: moving back to Afghanistan, which he feels would be safer than Greece.

Greece is the major entry point for Asian and African migrants and asylum seekers headed into Europe; there are about one million of them in the country today, thanks to the failure of successive Greek governments to establish a functioning migration or asylum policy, and a European Union regulation that allows member states to return asylum seekers to the country where they first entered Europe, which is often Greece.

Parts of Athens feel like a war zone. Racist gangs cruise the streets at night in search of victims. Themis Skordeli, a member of the group that is accused of stabbing Mr. Rahimi, ran unsuccessfully for Parliament on the ticket of Golden Dawn, a fascist group that is currently the third most popular party in Greece.