MOSCOW — Commandos in armored vehicles surrounded the residence of the mayor of Makhachkala, the capital of Dagestan, and arrested him on Saturday, bringing a swift end to his 15-year rule of one of Russia’s most violent cities and to his ambition to eventually lead the region.

The mayor, Said D. Amirov, 59, was detained in connection with the 2011 killing of a senior state investigator and will probably be charged under a statute that could send him to prison for life if he is convicted. Vladimir Markin, a spokesman for Russia’s powerful Investigative Committee, said investigators were looking into whether Mr. Amirov and a group of associates were behind a series of other high-profile crimes.

Mr. Amirov in many ways embodied the rough-and-tumble North Caucasus city he led, a place where brawls and gunfights are so standard that restaurant menus occasionally list the price of replacing damaged tables and chairs.

Americans know Makhachkala as the place where Tamerlan Tsarnaev, one of the suspects in the Boston Marathon bombings, spent six months in the year before the attack, reportedly meeting with fighters from the region’s insurgency.