All 18 officers at a Portuguese police station have been charged with torture, kidnapping and other crimes allegedly motivated by racism, prosecutors have said.

The Lisbon prosecutor's office said on Tuesday the crimes refer to an incident in 2015 when police clashed with young black men who had attempted to protest against another young man's arrest in a poor neighbourhood near the Portuguese capital.

The officers, representing the entire police force at the station in Alfragide, will face trial for "torture and other cruel, degrading and inhuman treatment", unlawful imprisonment, grave abuse of their powers and violation of their duties, the prosecutor's office said on its website.

Police responded on Tuesday by invoking the principle of the presumption of innocence, adding that two officers had already faced disciplinary sanctions.

READ MORE: The Portuguese denied citizenship in their own country

The charges were brought after a joint investigation by prosecutors and the Judicial Police that followed complaints by the families of the six men.

In February 2015, five of the men, aged 23 to 25 at the time, went to the station to protest against the "arbitrary and violent" arrest of one of their friends from Cova da Moura, a slum just 15 minutes drive away from the centre of Lisbon.

The five men were then also detained and "humiliated", the Diario de Noticias newspaper reported, citing the conclusions of a judicial investigation.

The six were held for 48 hours, during which they were "victims of tremendous physical and psychological violence by officials of an authority dominated by feelings of xenophobia, hate and racial discrimination," the Portuguese daily said.

At the time, the officers said dozens of young men had tried to force their way into the police station to free their friend, claims that were contradicted by the victims and other witnesses.

All six men were later cleared of charges of resisting arrest and assault.