The fight, involving makeshift knives, happened in the Korydallos prison over control of Wing C, authorities said.
The two dead inmates are Pakistani.
Prisoners of Albanian and Arab origin clashed with Pakistani inmates right after dinner on Sunday, and just before prisoners were led back to their cells, a justice ministry official said.
The attack involved makeshift knives.
The official, speaking on condition of anonymity because he wasn’t authorised to give details about an ongoing investigation, said the injured have been transferred to an outside hospital and at least two are in critical condition.
He said the situation inside the prison was now calm.
After the attack, a police SWAT team was waiting outside the prison in preparation for a raid to search for weapons in Wing C, one of two wings that houses foreigners.
The Korydallos prison, Greece’s largest, is overpopulated like most Greek prisons. It houses more than 2,000 convicts and inmates in six wings.
There have been several riots by prisoners protesting their incarceration conditions as well as several escape attempts, including two successful escapes by helicopter involving the same pair of prisoners, one of whom is still at large.
Gangs, often formed along ethnic lines, are prevalent according to prison staff members, who chronically complain of understaffing and of the difficulty to control the prisoners.
Last year, some of the most notorious convicts, including terrorists and other dangerous criminals were transferred to a new maximum security prison in central Greece, located far from urban centers and with limited visiting rights.
The current left-led government, in one of its first legislative acts, has decided to shut down that prison.
It is expected that many of its inmates will be transferred back to Korydallos.