Smoke rises after the recent shelling, in Stepanakert, Nagorno-Karabakh.
CNN  — 

The president of the contested Nagorno-Karabakh region warned citizens in large cities of Azerbaijan Sunday to leave to avoid “inevitable loss” after he said Azerbaijan targeted civilians in the region’s main city of Stepanakert the last couple of days.

Nagorno-Karabakh leader Arayik Harutyunyan said on Twitter that “mil objects in large cities of Azerbaijan are the target of the Defense Army of #Artsakh. Calling on Azerbaijani population to leave these cities to avoid inevitable loss.” Artsakh is the Armenian name of Nagorno Karabakh.

But Harutyunyan later tweeted that firing had “stopped.”

“Currently firing stopped upon my command to avoid loss among #civilians. Failing Azerbaijani military-political leadership to draw appropriate lessons, our commensurate response will pursue. Determined as never. #Azerbaijan can still stop its aggression,” he wrote.

Long-simmering tensions between Armenia and Azerbaijan have flared up recently in the contested Nagorno-Karabakh region, with both sides accusing each other of attacking civilians amid reports of casualties.

A view shows a building material store recent shelling in Stepanakert, Nagorno-Karabakh.
In this image, distributed by the Armenian government, a building burns after recent shelling during the ongoing fighting between Armenia and Azerbaijan over the breakaway Nagorno-Karabakh region, in the city of Stepanakert early on October 4.
A policeman stands in front of a building damaged by shellfire.

Populated and controlled by ethnic Armenians, Nagorno-Karabakh sits inside Azerbaijani territory. Its claim to independence is supported by Armenia, to which it is connected by two highways. Nagorno-Karabakh also exerts control over a handful of adjacent territories internationally recognized as belonging to Azerbaijan.

The neighboring countries have long been at odds over the mountainous territory, and fought a war over it that ended in 1994. Although the conflict finished with a Russian-brokered cease-fire, military skirmishes between the two sides are not uncommon.

Azerbaijan on Sunday said its heavily populated city of Ganja and several districts near Nagorno-Karabakh were struck by missile fire from Armenia.

“Indiscriminate Missile attacks are launched against Ganja, Füzuli, Tartar and Jabrayil cities of Azerbaijan from territory of Armenia. Ganja is the second biggest city of Azerbaijan. 500.000+ population,” Hikmet Hajiyev, a top foreign policy aide to Azerbaijani President Ilham Aliyev, tweeted.

Hajiyev also tweeted video of damaged buildings and cars with smoke rising in the sky and people gathered in the streets saying the footage was the “results of Armenia’s massive missile attacks against dense residential areas in Ganja city. Azerbaijan retains its right to take adequate measures against legitimate military targets to defend civilians and enforce Armenia to peace…”

Armenia’s Defense Ministry has denied firing at Azerbaijan.

“The Ministry of Defense of the Republic of #Armenia formally declares that no fire of any kind is being opened from the territory of Armenia in the #Azerbaijan’s direction,” Shushan Stepanyan, the press secretary for Armenia’s Defense Minister said on Twitter on Sunday.

Aren Melikyan and Arzu Geybullaeva contributed reporting.