RNA - Kampala's High Court jailed Sheikh Yunus Kamoga and three members of his Tabliq sect for life.
Two other members of Tabliq were each handed 30-year jail sentences, as well.
However, a day earlier, the top court acquitted the group of the murder and attempted murder charges.
Critics say the contradiction raises suspicion.
"I find the decision very unusual because the main case was about the murders and the terrorism was arising from the murders, so if they were not guilty of the murders then they should be not guilty of the terrorism," said human rights lawyer Ladislaus Rwakafuzi.
Kamoga’s lawyer Fred Muwema said the "court cannot accept something and deny it at the same time".
"That's a contradiction and a miscarriage of justice," he said.
In his three-and-a-half-hour judgment, Justice Muhanguzi claimed while the men were not proven to have killed anyone, they had threatened rivals.
Those threats amount to terrorism, he ruled.
"Court finds that death threats were delivered by word of mouth and on loudspeakers, hence it was indiscriminate," Muhanguzi said.
Solomon Muyita, the spokesman for Uganda's judiciary, said if Kamoga’s legal team had more evidence to show they should bring it to court.
Critics say Muslims in Uganda, in questionable cases, have been blamed for the murders of officials and Islamic clerics.
The cases include the murders of nine Muslim clerics since 2012; of Joan Kagezi, a prosecutor working on the 2010 Kampala bombings case, in March 2015; of an army officer in November 2016 who had defected from a Ugandan-led rebel group in eastern Democratic Republic of Congo; and of a prominent policeman in March.
‘Muslims are scapegoat’
"The Muslims are being profiled," said human rights lawyer Rwakafuzi.
"We have very poor, underfunded investigation mechanisms. It's an easy way out to show to the public that you're doing something about these killings."
Rwakafuz said the minority Muslim community in the country was being targeted amid a widespread anti-Islam campaign in Uganda and elsewhere.
The terrorism and murder charges against Kamoga and the others were "purely political", said a spokesman for the Tabliq sect, Siraje Nsambu.
"The government has clearly shown that it is against Islam and Muslims. We are used as a scapegoat", said Nsambu.
The recent ruling and harsh sentences have further angered the Muslim community that already feels marginalized by the Ugandan government and victimized by authorities.
Muslim leaders and Islamic institutions have urged Kampala to prevent the spread of Islamophobia.
Muslims constitute about 10 percent of Uganda's 41.5 million population.
847/940