In a four-page letter, Lopez said he was writing from the military jail of Ramo Verde. He urged all Venezuelans to instigate a "democratic rebirth" by making their voices heard in the country's next parliamentary elections.

Lopez had rallied opposition against heavy-handed rule by Venezuelan presidents.

Human rights activists and the U.S. government were appalled by his sentence. The court said Lopez committed serious crimes, according to Venezuelan state news agency AVN -- public instigation, vandalism, arson and criminal conspiracy.

Read More

But legal proceedings were a sham, said Human Rights Watch.

"The baseless conviction... exposes the extreme deterioration of the rule of law in Venezuela," HRW said in a statement. "The trials involved egregious due process violations and failed to provide evidence linking the accused to a crime."

U.S. Assistant Secretary of State Roberta Jacobson said she was "deeply troubled" by the conviction and called on the government to protect democracy and human rights in Venezuela.

Lopez remained defiant, writing on Friday, "I am certain of the goodness of our cause, which is no other than the liberation of a whole people who is suffering now the most painful consequences of an economically, politically and socially failed model."

Deadly protests

The accusations against Lopez stem from opposition street protests that turned deadly in February of last year. Dozens of people were killed, hundreds injured.

President Nicolas Maduro, the handpicked successor to deceased President Hugo Chavez, blamed Lopez, accusing him of terrorism and murder. When Chavez was alive, Lopez was already a thorn in the government's side. In 2008, Chavez' government banned Lopez, a former mayor, from running for office.

JUST WATCHED

Venezuela set to sentence opposition leader Lopez

MUST WATCH

Venezuela set to sentence opposition leader Lopez02:10

But much of the violence stemmed from security forces, which also arrested hundreds, HRW said. Security forces were accused of torture and abuse. "The government has also tolerated and collaborated with pro-government armed groups of civilians," HRW said.

Lopez briefly went into hiding but then turned himself in to authorities. He used social media to rally a crowd of supporters who met him on the occasion.

This week, the court said Lopez's involvement in protests was part of a plan for a coup d'etat.

In June, while in prison, Lopez went on a 30-day hunger strike to demand congressional elections. The government has agreed to the demand and elections are scheduled for December.

"For Venezuela to succeed, we have to change the system," Lopez wrote on Twitter. "But for this to happen, we have to take the power away from the corrupt elite that is ruling us. Next December 6th, we have an excellent opportunity to make progress in that direction." He was referring to the upcoming election for a new National Assembly.

He ended his message with a quote from the Rev. Martin Luther King Jr.: "If you can't fly then run, if you can't run then walk, if you can't walk then crawl, but whatever you do you have to keep moving forward."