“He can still appeal, but this outcome was decided by the senior leaders, and there’s no hope of changing the verdict,” Mr. Zhang said. He said the court could have imposed a maximum sentence of five years.

The State Department criticized the ruling and called on Chinese authorities to release Mr. Xu. “We are concerned that Mr. Xu’s prosecution is retribution for his public campaign to expose corruption and for the peaceful expression of his views,” Jen Psaki, a State Department spokeswoman, said in a statement.

The judgment, coming unusually swiftly after a trial Wednesday, will silence Mr. Xu for now. But the sentence could also enhance Mr. Xu’s prominence as an advocate for political liberalization. Mr. Xu and his two lawyers remained silent in protest for most of the proceedings, but Mr. Xu used his concluding statement to deliver part of an impassioned manifesto for democratic change, free speech and rule of law. The full text has circulated on the Internet.

For the verdict hearing, the police stood guard for blocks around the courthouse, keeping away journalists, diplomats and ordinary citizens concerned about the case. Journalists who tried to approach the court were told to leave.

As the first prosecution of a high-profile activist under Xi Jinping, the Communist Party secretary who took power in November 2012, the case was seen as a barometer of how China’s new leadership — the first in a decade — would respond to organized calls for reform. Some liberal intellectuals and rights advocates initially hoped that Mr. Xi would be more tolerant than his predecessor, Hu Jintao, of mild campaigns for change.