A Zimbabwean court ruled Friday that the country's leading opposition leader, Morgan Tsvangirai, was not guilty of treason, ending a legal ordeal that had clouded politics in the troubled country since his arrest two years ago.

The High Court judge, Paddington Garwe, found that there was insufficient evidence to convict Tsvangirai, 52, on charges that he had plotted to kill President Robert Mugabe, who has ruled the southern African country since its independence in 1980. Prosecutors relied mainly on a grainy surveillance videotape in which Tsvangirai supposedly discussed the "elimination" of Mugabe with a political consultant.

Police arrested Tsvangirai two weeks before the 2002 presidential elections, which he narrowly lost to Mugabe in balloting that international observers called seriously flawed. Tsvangirai and other leaders of his party, the Movement for Democratic Change, have consistently portrayed the prosecution as a political maneuver designed to discredit him.

Tsvangirai, who could have faced the death penalty, said in a statement: "I always expected the worst. As it turned out, justice has taken its course. I have been vindicated. Despite two wasted years, this verdict enables the people of Zimbabwe to look forward to a new Zimbabwe, a new beginning."

The opposition party's vice president, Gibson Sibanda, called the ruling "a huge blow to the forces of tyranny."

"It has not only been Morgan Tsvangirai that has been on trial but also Zimbabwe itself and the values and principles that we stand for as a country," Sibanda said in a statement. "Today's ruling, therefore, is a victory for the democratic values cherished and espoused by the majority of Zimbabweans, and it is a ruling that will galvanize the democratic struggle in Zimbabwe."

Justice Minister Patrick Chinamasa criticized the verdict, saying that "a guilty man has been allowed to walk out of the court scot-free."

Tsvangirai still faces unrelated treason charges for allegedly violating the Public Order and Security Act in 2003.

Bracing for potentially violent protests, authorities in Harare, the capital, set up blockades, and a heavy police force was on display in the city center. But the verdict, issued at midday, prompted jubilant celebrations by Tsvangirai's supporters, according to the Associated Press.

The treason charges grew out of an encounter in December 2001 between Tsvangirai and Ari Ben-Menashe, a political consultant based in Canada. Prosecutors portrayed the meeting as part of an effort to arrange for Mugabe to be assassinated.

Tsvangirai maintained that he had spoken only about his hopes for victory at the polls, and that Menashe had been hired by the government to entrap him. Opposition leaders said Tsvangirai's acquittal removed one obstacle to free and fair national elections scheduled for March. The party had threatened to boycott the vote if Mugabe did not end political violence or if he failed to institute several reforms, including the creation of an impartial election commission.

The party has also demanded equal treatment in news reports. Mugabe's government controls all television and radio stations and daily newspapers, which broadcast and print reports each day filled with attacks on opposition leaders and praise for the ruling party.

In the past five years, Mugabe has cracked down on dissent and seized thousands of white-owned commercial farms.

John Mw Makumbe, a political science professor at the University of Zimbabwe, praised the ruling issued Friday but said it may have resulted from Mugabe's desire to appear to international observers as respectful of the rule of law as the March elections approach.

"It is too little too late," Makumbe said. "Too much damage has been done."

Morgan Tsvangirai, left, the leader of Zimbabwe's opposition group, Movement for Democratic Change, toasts his verdict with party vice president Gibson Sabanda at his house in Harare.