The sentence is the heaviest handed to a protester in the trial of scores detained over their involvement in anti-regime protests in the oil-rich Eastern Province since February 2011.
The court, which specialises in terrorism cases, convicted the Saudi man of "disobedience... Undermining security and causing sedition" by opening fire on a police patrol in the Shiite-populated Qatif district with the help of two accomplices, according to local media.
The defendant was also accused of "covering up for a group of rioters."
Activists identified the convict as Rida Rabih, son of Shiite cleric Jaafar Rabih, who became known for his efforts to ease tensions that were brewing in Qatif's flashpoint village of Awamiya.
Also Read
Demonstrations in Eastern Province, where most of the kingdom's two million Shiites live, erupted in 2011 alongside a Shiite-led protest movement in neighbouring Bahrain.
They took a violent turn in 2012 and clashes between police and protesters have so far killed 24 people, including at least four policemen, according to activists.
In January, the US embassy in Riyadh warned its citizens against travelling to Awamiya after gunmen opened fire on the car of two German diplomats, who escaped unhurt.