The four men charged with the massacre at a Moscow theater have been identified by authorities as citizens of Tajikistan, some of the thousands who migrate to Russia each year from the poorest of the former Soviet republics to scrape out marginal existences.

Along with grinding poverty, Tajikistan is rife with religious tensions. Hard-line Islamists were one of the main forces opposing the government in a 1990s civil war that devastated the country. The militants claiming responsibility for the Moscow massacre that killed 139 people — a branch of the Islamic State group in neighboring Afghanistan — reportedly recruit heavily from Tajikistan.

The four suspects who were arraigned in a Moscow court late Sunday on terrorism charges appeared to have been beaten or injured during their detention. One was wheeled in on a gurney clad only in a hospital gown.

Russian President Vladimir Putin on Monday described the suspects as “radical Islamists,” and he repeated his accusation that Ukraine might have played a role despite its strong denials.

Here is a look at the people, militant groups and political history connected to the Moscow attack:

The suspects

The eldest defendant is Dalerdzhon Mirzoyev, 32, who may have been living in Russia illegally. He was shown sitting in a glass cage in the courtroom with a black eye and bruised face.

Mirzoyev reportedly had obtained a three-month residency permit in the city of Novosibirsk, but it had expired. In video of his interrogation shared on Russian social media, he reportedly says he recently was living in a Moscow hostel with another of the suspects. The court said he is married and has four children, but it was unclear if he was employed.

Saidakrami Murodali Rachabalizoda, a suspect in the Crocus City Hall shooting, sits in a glass cage in the Basmanny District Court in Moscow, Russia, March 24, 2024.

Saidakrami Murodali Rachabalizoda, a suspect in the Crocus City Hall shooting, sits in a glass cage in the Basmanny District Court in Moscow, Russia, March 24, 2024.

Saidakrami Murodali Rachabalizoda, 30, is apparently unemployed. Registered as a resident in Russia, he could not remember in what city, according to Russian news reports. When he appeared in court, his head was awkwardly bandaged after Russian officers reportedly sawed off one of his ears.

Shamsidin Fariduni, 25, apparently had the most stable life of the four suspects. He was registered in Krasnogorsk, the Moscow suburb where the killings took place, and worked in a flooring factory. He reportedly told interrogators that he was offered 500,000 rubles (about $5,425) to carry out the attack — the equivalent of about 2.5 years of the average wage in Tajikistan.

Mukhammadsobir Faizov, 19, was brought into the courtroom on a gurney, with a catheter attached and one eye injured or missing, and he appeared to fade in and out of consciousness. He had worked as an apprentice in a barbershop in the declining textile-mill city of Ivanovo, but reports said he left that job in November.

Islamic tensions in Tajikistan

As many as 1.5 million Tajik migrants are estimated to be in Russia after fleeing the poverty and unemployment that plague their landlocked, mountainous country. An array of mineral resources are present in Tajikistan, but the industry has been slow to develop because of belated foreign investment and poor geological data, among other factors.

Although its nearly 10 million people are overwhelmingly Muslim, tensions connected to Islam are common.

Islamists were a key opponent during a 1992-97 civil war in which the government killed as many as 150,000 people and devastated the economy. When the war ended, Tajik President Emomali Rahmon took steps to sharply curtail religious freedoms.

FILE - A national flag of Tajikistan is hoisted to the top of the 165-meter (541.34 feet) flagpole in Dushanbe, Tajikistan, May 24, 2011.

FILE – A national flag of Tajikistan is hoisted to the top of the 165-meter (541.34 feet) flagpole in Dushanbe, Tajikistan, May 24, 2011.

The government limited how many mosques could be built, prohibited women and children under 18 from attending mosques at all, and banned religious instruction outside the home for children. Critics say the limits encouraged people to turn to underground and radical Muslim factions via the internet.

Tajikistan has not made any official statement about the arrest of the four men suspected in the attack. But Rahmon was quoted by his government’s press service as telling Putin in a phone call that “terrorists have neither nationality, nor a homeland, nor religion.”

Islamic State vs. Russia

Most attacks tied to Islamic extremists that afflicted Russia in the past quarter century were committed by Chechen separatists, such as the 2004 Beslan school seizure that killed more than 300 people — or were blamed on them, as in the 1999 apartment bombings that triggered the second Russia-Chechnya war.

But attacks that began in 2015 were claimed by or attributed to the Islamic State group. The group opposed Russia’s intervention in Syria, where Moscow sought to tip the balance in favor of President Bashar al-Assad’s forces.

The U.S. government has said it had intelligence confirming IS was responsible for the weekend attack in Moscow.

After IS declared a caliphate in large parts of Syria and Iraq in June 2014, thousands of men and women from around the world came to join the extremist group. Those included thousands from the former Soviet Union, among them hundreds from Tajikistan.

One of the most prominent figures to join IS was Gulmurod Khalimov, who was an officer with Tajikistan’s special forces before defecting and joining IS in Syria in 2015. In 2017, the Russian military said Khalimov was killed in a Russian airstrike in Syria.

IS claimed responsibility for the 2015 bombing of a Russian airliner that was bringing tourists home from the Egyptian resort Sharm al-Sheik. Two years later, it claimed to be behind the suicide bombing of a subway train in St. Petersburg that killed 15 people.

Two weeks before the Moscow theater massacre, Russian officials said they had wiped out members of an IS cell that was planning to attack a synagogue. Earlier in the month, it reported killing six IS fighters in the Ingushetia region adjacent to Chechnya.