BISHKEK, Kyrgyzstan – Mobs of armed men torched Uzbek neighborhoods in southern Kyrgyzstan on Friday in ethnic clashes that officials said left at least 39 people dead and nearly 600 wounded. A state of emergency was declared in the Central Asian nation that hosts US and Russian military bases. The rioting in Osh, the country's second-largest city, is the heaviest violence since former President Kurmanbek Bakiyev was toppled in a bloody uprising in April and fled the country. The intensity of the conflict, which pits ethnic Kyrgyz against minority Uzbeks, appeared to have taken authorities by surprise and threw the fragile interim government's prospects for survival into doubt. Quelling the violence will prove a decisive test of the government's ability to control the country, hold a June 27 vote on a new constitution and go ahead with new parliamentary elections scheduled for October. Dozens of buildings across Osh were ablaze Friday after witnesses reported sustained gunfire beginning late Thursday. Gangs of young men armed with metal bars and stones attacked shops and set cars alight. The interim government declared a state of emergency in Osh and dispatched armored vehicles, troops and helicopters to pacify the situation. Soldiers were posted at routes into the city and at major intersections, but the fighting did not abate. Authorities imposed a curfew from 8 p.m. to 6 a.m. until June 20. Ikram Abdumalitov, who lives in Osh, said he saw about 1,000 young and armed Kyrgyz men marching toward Uzbek neighborhoods in eastern Osh. "The Uzbeks are in turn chopping down trees and blocking the road to their neighborhood," Abdumalitov said. Armed men flooded in from nearby villages to join the fight, a trader in Osh said, speaking on condition of anonymity due to the volatile situation. "I have just driven through the city and the streets are filled with young men brandishing sticks, armor and weapons," said Bakyt Omorkulov, a member of the Coalition for Democracy and Civil Society, a non governmental group. He said Uzbek areas were hard hit by the violence. "Aravan Street is completely destroyed, dozens of cafes and buildings are burning — it's the same picture in Cheryomushki. It's like being in Chechnya," he told The Associated Press in a telephone interview. Many of the injured had been stabbed or shot, Health Ministry spokeswoman Yelena Bailinova said as she gave the death toll. Dozens were reported in serious condition.