Capt Nabih and his co-defendant are to appeal against the conviction
Two Egyptian policemen have been jailed for three years each for torturing a bus driver during police custody.
The police officers filmed the sexual assault of Emad al-Kebir, 22, on a mobile phone. The footage eventually emerged on the internet.
The case is one of several notorious incidents of abuse by the security forces to be uncovered in Egypt, mostly driven by activist bloggers.
Mr Kebir, who was in court to hear the verdicts, welcomed the ruling.
"God is great! Thank God!" he said. "I regained my rights. I don't want anything more than that."
The police officers, Capt Islam Nabih and non-commissioned officer Reda Fathi, sexually assaulted Mr Kebir with a stick and hit him with shoes, a whip and a gun, the court heard.
Court officials said both men will appeal against the verdict.
In January 2006, Mr Kebir was detained for attempting to stop an argument between his cousin and a policeman and suffered the assault.
The graphic footage appeared on the web in November 2006
He was released without charge, but later arrested and jailed for three months after a judge found him guilty of resisting arrest.
This followed his attempts to complain to the authorities about his treatment.
In November 2006, several Egyptian bloggers posted a video of his assault and it also appeared on the video-sharing site YouTube.
The video, in which Mr Kebir is shown screaming on the floor while being abused with a stick, shocked the country, reports the BBC's Heba Saleh in Cairo.
Mr Kebir's release had already been ordered by a prosecutor when the assault took place.
The policemen, who filmed the ordeal themselves, circulated the footage in an attempt to intimidate others, our correspondent reports.
Human rights groups say the court decision to jail the policemen is a message to victims of torture, telling them they should break their silence and seek justice.
They agree with lawyers who assert that torture is endemic in Egypt because suspects are held incommunicado for long periods of time and police interrogations take place without counsel.
The Egyptian authorities reject this and have cited the arrest and trial of Mr Kebir's torturers as proof that they do not tolerate abuse.