President Dmitry Medvedev made a surprise visit on Thursday to the violence—wracked southern province of Dagestan, telling police and security forces to use tougher, “more cruel” measures to fight the “scum” responsible for terrorist attacks.

In his dress - a black T—shirt under a black suit coat - and rough language, Mr. Medvedev was following the lead of Russia’s powerful prime minister, Vladimir Putin.

Twin suicide bombings this week in Moscow - which Islamic militants from the North Caucasus claim to have carried out - has refocused attention on the violence that for years has been confined to the predominantly Muslim republics in Russia’s southern corner.

An explosion on Thursday morning killed two suspected militants and wounded a third in Dagestan near the border with Chechnya. Police said the men may have been transporting a makeshift bomb. The day before, two suicide bombings in Dagestan killed 12 people, including nine policemen, a frequent target of attacks because they represent Russian authority.

The suicide bombings on the Moscow subway killed 39 people on Monday and have left nearly 90 hospitalized.

Federal Security Service director Alexander Bortnikov, said the organizers of the Moscow attacks have been identified as “bandits” from the Northern Caucasus, and some have been detained.

“We know the personalities of organizers,” he said in televised remarks. “We have detained a number of people, conducted interrogations, got evidence.”

Mr. Medvedev said much more needed to be done to stop the attacks.

“The measures to fight terrorism should be expanded, they should be more effective, more harsh, more cruel,” he said during a televised meeting with local officials.

In recent months, police and security forces have killed at least two high—profile Islamic militants, but they have been unable to capture the veteran Chechen militant Doku Umarov, who has claimed responsibility for the Moscow subway attacks.

“We have torn off the heads of the most notorious bandits, but clearly this was not enough. In any case, we will find them all and punish them,” Mr. Medvedev said.

More In: International | News