High Judicial Court in Cairo. File photo
The ruling is not final and can be appealed.
The victims, who were members of the same family, included a farmer, his two daughters and two grandchildren.
The convicted man, a farmworker in his 50s, confessed to the crime after being arrested in May.
News of the murders caused huge uproar on social media, due to the particularly brutal circumstances surrounding the incident.
The victims’ bodies were found in an allotment on the farm, with their bodies stabbed and slashed.
The police arrested the man less than 48 hours after the crime.
The man told the prosecution that he stabbed the farmer in the neck during a fight at the farm and that he had planned to sexually assault the daughter after drugging the rest of the family members.
The prosecution denied claims on social media at the time alleging an illicit relationship between the man and the farmer’s daughter, saying the witnesses’ testimonies, the man’s confessions and the investigations all refute these claims.