Eight of the 38 opposition figures in court were given shorter prison terms. The prosecution had demanded the death penalty for them all.
They refused to recognise the court, saying the trial was political.
Their relatives say the detainees have signed a document which could pave the way for their release.
High court judge Adil Ahmed also barred the 30 Coalition for Unity and Democracy (CUD) leaders from voting or standing for election.
Before the sentences, the US had warned that any judgement should promote reconciliation between the government and the opposition.
The BBC's Elizabeth Blunt in Addis Ababa says the trial has been closely watched in the city, a CUD stronghold.
She says that the entire front row of seats in the court was taken up by diplomats and a simultaneous English translation was provided.
Five of the 38, including CUD leader Hailu Shawel, were also convicted of inciting, organising and leading armed rebellion.
Ethiopia's government has always stressed that the courts are independent and denies that the trial is political.
Relatives of the 38, who include two women, say they have signed a document which lead to them being freed. Our correspondent says this could be some form of apology or plea for mercy.
Among the 38 are the entire CUD leadership, several of the capital's elected MPs and city councillors, including Berhanu Negga, mayor-elect of Addis Ababa.
Prosecutor Abraham Tetemke said they had tried to bring down the government when he called for the death penalty last Monday.
Hundreds of thousands took part in demonstrations complaining of fraud and rigging in the elections won by Prime Minister Meles' party.
Some 193 people were killed in protests at alleged vote-rigging.
Most of the dead were protesters, killed by security forces.
An independent inquiry carried out by an Ethiopian judge concluded that the police had used excessive force.
He went on to accuse them of carrying out a massacre. The judge later fled Ethiopia, saying he had been put under pressure to change his findings and had received death threats.
The government points out that it introduced multiparty elections to Ethiopia after years of military rule.
In the elections, the opposition made huge gains but says it was cheated out of victory.
Three months ago, a judge threw out controversial charges of attempted genocide and treason against another 111 people arrested after the election protests.
The violence and the charges of election fraud have tarnished Mr Meles' image as a favourite of Western donors and one of a new wave of reforming African leaders.Some donors have reduced aid over the case.