Ahmad al-Gizawy is a human rights lawyer who had taken up the cause of Egyptians detained in Saudi prisons and was highlighting the poor treatment meted out to them.
He was arrested in April for attempted drug trafficking when he arrived in Saudi Arabia to perform Umra or a minor pilgrimage.
His arrest at the airport had stirred protests in Cairo, where thousands protested in front of the Saudi embassy.
Following the protest at the Saudi embassy, Riyadh had recalled its ambassador from Egypt as the diplomatic row escalated.
The protests were violently dispersed by the army which was in charge of the country back then when Muhamad Mursi was yet to elected president.
A court in Jeddah sentenced al-Gizawy to a prison sentence of five years, in addition to 300 whip lashes.
Also Read
The judge said he was being given a "lenient" punishment taking note of the accused's "good morals" and the fact that he has no judicial precedents.
The verdict can be appealed within a month.
Gizawi was arrested in April carrying drugs, which his family said were anti-anxiety medication, according to BBC.
Saudi authorities, however, alleged that he was found carrying more than 20,000 anti-anxiety pills.