Judge Abd al-Rahman al-Jahhaf ruled that Ali Ahmad Jar Allah should be executed by firing squad. He also ordered six of the cleric's accomplices to be jailed.
Jar Allah, 32, confessed in court in July that he had acted alone in fatally shooting Jar Allah Umar, deputy leader of the opposition Yemeni Socialist Part in Sanaa last December.
But the judge differed and sent six of his accomplices, accused of belonging to an armed gang that Jarallah had set up, to prison terms of between three and 10 years.
The judge however acquitted seven other people accused of being members of the same gang.
"Jar Allah used the Masik mosque in Sanaa, where he was the imam, to recruit and train youngsters to carry out attacks and sow sedition throughout the country," the judge told the court.
"Jar Allah had prepared and distributed 1533 video cassette recordings of lectures about a dozen subjects, inciting violence," he added.
A former member of the Islamist al-Islah Party, Jar Allah quit the party shortly before the killing, complaining it had gone soft on Westerners and minority Islamic sects.
Lawyers defending the imam said they would appeal against the sentence.