Tajik special forces have entered into the eastern Gorno-Badakhshan region in the last days after the murder of regional security chief General Abdullo Nazarov, which the authorities blamed on an ex-warlord turned renegade local strongman.
The clashes on Tuesday mark the biggest upsurge of internal unrest for two years in mainly Muslim Tajikistan, the ex-Soviet Union's poorest state that borders Afghanistan and China and is still recovering from a 1992-97 civil war.
"During the special operation in Badakhshan province, 12 troops were killed and 30 militants were killed," the security service said in a statement read on state television. "The special operation is continuing."
Some 40 fighters, including eight Afghan citizens, have been arrested while 23 troops were also wounded in the clashes, the statement added, denying unconfirmed reports of large numbers of deaths among civilians during the operation.
Tajik forces were using tanks and helicopters against the rebel positions, local media reports said.
A military source, who asked not to be named, told the AFP news agency the dead and wounded were being transferred by helicopter to the capital Dushanbe.
The clashes were centred around the main town of the region, Khorog, which lies in the Pamir Mountains just east of the border with Afghanistan some 500km from Dushanbe and where the federal government has long had little authority.
The operation was launched after Nazarov was pulled out of his car and stabbed to death on Saturday, in a killing that sent shockwaves through Tajikistan.
The security service veteran had served as the deputy head of the State Committee for National Security (ex-KGB) until being assigned to bring order to the Mountainous Badakhshan Autonomous Region (MBAR) in 2010.
The authorities initially pointed the finger at tobacco smugglers but then implicated a former rebel commander from the civil war, Tolib Ayombekov, who had since become a commander of the state border unit on the Afghan frontier.
The state national security committee has said Ayombekov is now leading an armed group which has been involved in smuggling and had also carried out a string of deadly crimes on the frontier.
The murder appears to have prompted the government to launch an all-out assault to impose control over a region where for long its command has carried little authority.
The Gorno-Badakhshan region, making up almost half of Tajikistan, is one of its poorest areas and has long been notorious as a fiefdom of local strongmen, many of whom fought as rebels in the civil war.
A top regional prosecutor, Nafasbek Dilshodov, was also seriously wounded in what the authorities described as a "terror attack" on Monday night.
In a sign of the gravity of the situation, all phone and internet communication links with Gorno-Badakhshan have been cut off.
Tajik media said all shops in Khorog were closed, the market was shut and all state offices besides the police were not working while dozens of houses were lying in ruins.
The unrest appears to be the most serious security challenge for the regime of President Emomali Rahkmon since the security forces suffered repeated attacks by fighters in the Rasht Valley in the summer 2010.
That violence followed the escape of 25 fighters from a prison in a brazen nighttime jailbreak in August 2010 that saw almost 40 members of the security forces killed.