File photo: Leopoldo Lopez is flanked by Bolivarian National Guards after he surrendered to authorities in Caracas, Venezuela. (Alejandro Cegarra/AP)

Venezuelan opposition leader Leopoldo López was condemned to 13 years and nine months in a military prison Thursday night, a maximum sentence that is likely to further inflame tensions in this badly divided country.

Accused of “inciting violence” and other charges for his role in mobilizing anti-government street protests last year, Lopez addressed the courtroom, López addressed the courtroom in a nearly three-hour speech prior to receiving the guilty verdict and prison term from Judge Susana Barreiros, as pro-government crowds celebrated outside the courthouse.

López’s supporters, pushed to another part of the city, denounced the verdict, many in tears, as other Venezuelans banged on cooking pots from their windows and balconies in protest.

Three student activists who were co-defendants in the trial also were convicted, but received lighter sentences. López was allowed a few moments with his family, then was sent back to the isolation cell at the military jail where he has spent the past 18 months.

epa04920903 Lilian Tintori, wife of Venezuelan opposition leader Leopoldo Lopez. cemter. speaks to the reporters in Caracas, Venezuela, 08 September 2015. (Miguel Gutierrez/EPA)

“This case is a complete travesty of justice,” José Miguel Vivanco, the Americas director at Human Rights Watch, said in a statement.

“In a country that lacks judicial independence, a provisional judge convicts four innocent people after a trial in which the prosecution did not present basic evidence linking them to a crime, and the accused were not allowed to properly defend themselves,” he said.

The harsh sentence for López is almost certain to strain relations with the Obama administration at a time when President Nicolás Maduro’s government has been saying it wants to reset relations with Washington.

A senior U.S. diplomat, Thomas A. Shannon Jr., has met with Maduro and other top officials in recent months to convey U.S. concern about the outcome of the López trial. But pressure from U.S. officials appeared to make little difference.

On Twitter, the top U.S. official for the Western Hemisphere, Roberta S. Jacobson, said she was “deeply troubled” by the conviction.

The judge “has given López close to the maximum sentence in a trial based on questionable evidence and with clear political motivation,” said David Smilde, a sociologist at Tulane University who has lived and worked in Venezuela for the past 20 years.

“This will challenge the new diplomatic channel between Venezuela and the United States developed over the past five months,” Smilde said. “The U.S. government will not likely break off relations, but they will undoubtedly raise their voice against this.”

Supporters of jailed opposition leader Leopoldo López shout slogans outside the courthouse in Caracas, Venezuela, on Sept. 10, 2015. (Ariana Cubillos/AP)

The judge’s ruling leaves the country once more bracing for protests, and Venezuela’s opposition leaders now face a difficult choice. They can call for street demonstrations that risk a security crackdown or try to channel frustrations into Dec. 6 elections that some insist will be a better outlet for opposition anger at the Maduro government.

An opposition win at the polls in December may be López’s best hope for an early release. He was convicted on charges of inciting violence for urging Venezuelans to join street protests against the Maduro government in February 2014.

The unrest continued for several months after López was taken into custody and left 43 dead and hundreds injured before fizzling out amid a harsh crackdown by security forces.

A Harvard-trained former mayor of Caracas’s Chacao district, López, 44, is the most prominent of several opposition leaders whom the Maduro government has put in jail as Venezuela sinks deeper into its worst economic and political crisis in more than a decade.

The Obama administration early this year levied individual sanctions on several Venezuelan officials, revoking the visas and freezing the U.S. assets of a group of military and security officers accused of rights violations during the spring 2014 crackdown on the street protests.

Barreiros allowed testimony from more than 100 witnesses on behalf of government prosecutors,while blocking all but a handful of witnesses offered by López’s defense.

The government’s case against López rested on his calls to protest under the Twitter hashtag #LaSalida — “The Exit” or “The Solution.”

Despite his insistence that statements he made called for “peaceful, constitutional” measures to oust Maduro, prosecutors said López’s underlying intent was to provoke a violent uprising. Linguists and speech experts were brought in by the prosecution to analyze the “subliminal” content of López’s Twitter statements.

Maduro and other top Venezuelan officials publicly declared López guilty long before Thursday’s conviction, labeling him a “terrorist” and “murderer” while offering to free him in a prisoner swap with the United States even though the trial was ongoing.

International observers and journalists have been largely barred from attending the closed-door proceedings. Several other opposition leaders, including Caracas Mayor Antonio Ledezma, have been jailed since López’s arrest and are awaiting trial.

Miroff reported from Havana.