KIGALI, Rwanda (AP) — A Rwandan court sentenced the country's top opposition political leader to eight years in prison on Tuesday for treason and on a charge stemming from this central African nation's murderous ethnic attacks 18 years ago — genocide denial.

The opposition leader, Victoire Ingabire, returned to Rwanda in 2010 after living abroad for 16 years and quickly visited the country's genocide memorial, where she asked why Hutus killed in the violence were not recognized like the minority Tutsis were. She had planned to run for president but instead was arrested.

More than 500,000 Rwandans, mostly ethnic Tutsis and moderate Hutus, were killed in Rwanda's 1994 genocide. In the wake of that violence, the government set out to de-emphasize ethnicity. Many in the country now identify themselves simply as a Rwandan, not a Hutu or Tutsi.

The government accused Ingabire — who has had contacts with the FDLR, a group of Hutu fighters in Congo — of trying to raise an armed group, a charge Ingabire denied. The court on Tuesday acquitted her on charges of promoting ethnic division, genocide ideology, creating an armed group, and complicity in terrorist acts.

"That's the problem I have with this government. If you talk about ethnicity, they say you are a divisionist," Ingabire said in a 2010 interview with The Associated Press after she was put under house arrest. "I think the better solution is you talk about it and find a solution."

The government's chief prosecutor, Martin Ngoga, responded that Ingabire's statements were not simply a free-speech issue because she could incite Rwanda "to once more explode" as it did in 1994.

President Paul Kagame has been lauded by the international community for leading Rwanda through nearly two decades of peace, for advancing women's rights and for leading the country to strong economic growth. But the court's sentence reinforces the view by political analysts that opponents of Kagame have little space to operate in post-genocide Rwanda.

Human Rights Watch criticized the guilty verdict as the culmination of a "flawed trial that included politically motivated charges."

"The prosecution of Ingabire for 'genocide ideology' and divisionism illustrates the Rwandan government's unwillingness to tolerate criticism and to accept the role of opposition parties in a democratic society," said Daniel Bekele, Africa director at Human Rights Watch. "The courts should not be used for such political purposes."

Human Rights Watch said it can't comment on the veracity of the charges relating to Ingabire's alleged collaboration with armed groups, but expressed concern that some of the evidence used to convict her appears to be unreliable.

Though Rwanda appears serene on the surface, Ingabire's political party — FDU-Inkingi — calls Kagame a dictator. The party urged Rwandans to remain calm and "to get ready for the day to march until freedom is won."

"This is a conclusion of a long chapter of hope that the current dictatorship would understand how important peace, genuine unity and sustainable reconciliation are," a statement from a party leader Boniface Twagirimana said.

Judge Alice Rulisa, speaking for a three-judge High Court panel, said Ingabire was given a lighter sentence because she had written a letter to Kagame asking for leniency. Edwards, the lawyer, said Ingabire admitted to no crimes in the letter.

The trial began in September 2011 and wrapped up in April. Four co-defendants all implicated Ingabire in collaboration with armed groups.

The prosecution had requested a total of 35 years on the two charges. The court said it gave credibility to Ingabire's argument that she had been out of the country for so long that her statements and speeches were out of touch with reality when she returned to participate in the 2010 presidential election.

Ingabire withdrew from her case in April, citing a lack of an independent judiciary.

Twagirimana told AP after the ruling that Ingabire should appeal to a court outside Rwanda, such as the African Court on Human and People's Rights.

Ingabire's co-accused, four men who are all former members of the Democratic Forces for the Liberation of Rwanda (FDLR), were also handed lighter sentences Tuesday after they pleaded guilty on all charges and pleaded for leniency from the court.