A court in the southern city of Curitiba passed down the sentences on the men who were arrested in the run-up to South America's first Olympic Games.
The loosely organized group was found guilty of recruiting and promoting terrorism.
The men "exulted in and celebrated terrorist acts carried out around the world, publishing videos of executions by the Islamic State (group) and instructions on how to swear loyalty to the group's leader," Judge Marcos Josegrei da Silva said in his sentencing.
The group also "discussed the subject of potential targets in Brazil -- foreigners during the Olympic Games, homosexuals, Shiite Moslems and Jews -- as well as instructions for bomb building, use of knives and the acquisition of firearms," he said.
The men discussed terrorism online -- principally on the messaging service Telegram -- and had few other personal links.
The Olympic Games ran between August 5-21 without major security incidents.
However prosecutor Rafael Brum noted in September that the group's discussions "demonstrated the idea that they should move on from theoretical planning to start acting in practice" and "to take advantage of the Olympics."
The communications between the group were focused in the period between mid-March and July 21, 2016, when the first arrests were announced in an operation called "Hashtag."
At the time, Justice Minister Alexandre de Moraes described the group of Brazilian nationals as "an absolutely amateur cell" and "disorganized."
"Some of them made an oath of loyalty by Internet to the Islamic State, but there was no personal contact by this group with ISIS by WhatsApp," de Moraes said.
The most concrete act by the group was an attempt to contact a black market weapons supplier in neighboring Paraguay to purchase a Kalashnikov assault rifle.
The group's members also encouraged each other to start martial arts training, even though this was only two weeks before the Games started.
The defense minister, Raul Jungmann, referred at the time to the group's "craziness."
Brazil was under pressure ahead of the Oympics to ensure security in Rio, which even in normal times suffers from rampant armed crime.
Some 85,000 police and soldiers were deployed to secure around 11,000 Olympic team members and several hundred thousand tourists.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.