MOSCOW — A Russian military court on Monday handed down harsh sentences of up to 18 years to seven members of a group of left-wing activists, who in turn accused the authorities of extorting confessions through torture and threats against their families.

Critics said the charges of terrorism were fabricated and that the accused, as in other previous incidents, were entrapped by security agents. They compared the use of torture to extort testimony to the practices used by Soviet security forces during Stalin’s purges in the 1930s and early 1950s.

The seven men, aged 23 to 31, were accused of creating a terrorist organization called “the Network” with the aim of launching terror attacks ahead of the 2018 World Cup soccer tournament in Russia and the presidential election that took place the same year.

The prosecutors said the organization was managed from the Russian provincial city of Penza, where the Monday hearing took place. It also had cells in Moscow, St. Petersburg and in Belarus, said officers of the Federal Security Service, or the F.S.B., who ran the investigation.