The clashes between the two former Soviet republics, which fought a war in the 1990s, were the latest flare-up of a long-running conflict over Nagorno-Karabakh, a breakaway region that is inside Azerbaijan but is run by ethnic Armenians.