
Lawyer Karim Hamdy, 27, was arrested in February on charges of taking part in anti-government protests organised by the Muslim Brotherhood, the movement that the military removed from power in mid-2013.
He died two days after his arrest after sustaining fractures to the ribs, bruises and bleeding in the chest and head, the initial forensic report showed.
The lieutenant colonel and major with the national security agency were found guilty of torturing Hamdy to death.
Egypt releases Israeli convicted of spying
More than 200 lawyers are behind bars in Egypt for defending the government's opponents, according to attorneys and human rights groups.
Egyptian police, notorious for human rights abuses during the rule of autocrat Hosni Mubarak, melted away during an uprising which toppled him in 2011.
They have since made a strong comeback, with rights groups saying police brutality is widespread in Egypt.
The sentence, which can be appealed, comes a day after nine other policemen were referred to a criminal court and charged with beating to death a father of four.
Gunmen kill four Egypt policemen south of Cairo
He was one of at least three men who died in police custody in the space of a week in November, prompting riots in his home town and rare media scrutiny of police methods.
Despite the growing outcry over such allegations of abuse of suspects, critics blame a culture of impunity for police still only rarely being held to account and have called for an independent body to investigate abuse cases.
The Interior Ministry has said it would investigate all abuse allegations.
Egypt detains two airport staff in connection with Sinai air crash: sources
An end to police brutality was one of the key demands of the 2011 uprising that ended Hosni Mubarak's 30-year rule.
Unlike in the past, the families of those who have died in custody have been vocal in their demands for transparent investigations.
"The verdict is a condemnation of the torture policy in police station and confirms that the victim was tortured and killed by the two officers," lawyer Mohamed Othman, representing Hamdy's family, told Reuters.
"The verdict is a message to all those in power who make light of people's dignity."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ