The Armenian defence ministry says the ceasefire was brokered by Russia after clashes sparked fears of a new flare-up.
Seven Azerbaijani service members were killed and 10 more were wounded in clashes with Armenian troops on the countries’ shared border, according to Azerbaijan’s defence ministry.
Armenian officials reported one casualty and said 13 soldiers were captured during Tuesday’s hostilities, while 24 more have gone missing.
Both sides blame the other for starting the hostilities.
The Armenian defence ministry said Azerbaijan’s military opened fire on Armenian positions.
The Azerbaijani government accused Armenia of a “large-scale provocation”.
The clashes marked the worst fighting between the two ex-Soviet nations since they fought a six-week war last year over the Nagorno-Karabakh region, a conflict that killed more than 6,500 people.
Tuesday’s casualties have sparked fears of another big flare-up in their territorial dispute.
Fighting ceased on Tuesday evening after Russian Defence Minister Sergei Shoigu spoke by phone to his Armenian and Azerbaijani counterparts and urged them to stop.
Armenian Prime Minister Nikol Pashinyan also spoke with Russian President Vladimir Putin about the situation at the border.
Al Jazeera’s Robin Forestier-Walker, reporting from Georgia’s capital, Tbilisi, said the ceasefire appeared to be holding on Wednesday.
“This appears to have been the worst fighting we have seen since the Nagorno-Karabakh conflict late last year, although the difference is this is taking place now in a border area not in Nagorno-Karabakh … that Armenia says is actually deep inside Armenian sovereign territory,” he said.
Forestier-Walker said the clashes had taken place in the region of Nakhchivan, an Azerbaijani exclave located close to Armenia’s border with Iran.
Decades-old dispute over Nagorno-Karabakh
Armenia and Azerbaijan have been locked in a decades-old dispute over Nagorno-Karabakh, a region that lies within Azerbaijan but was under the control of ethnic Armenian forces backed by Armenia since a war there ended in 1994.
Last year’s war over the territory ended after Russia, which has a military base in Armenia, brokered a peace deal in November and deployed almost 2,000 peacekeepers to the region.
Turkey took the side of Azerbaijan, which regained swathes of land it lost in an earlier conflict.
The Russia-brokered truce allowed Azerbaijan to reclaim control over large parts of Nagorno-Karabakh and surrounding areas that the Armenia-backed residents had controlled.
Under the deal, Yerevan also agreed to give Baku a new transit corridor through southern Armenia to Nakhchivan.
But tensions on the Armenia-Azerbaijan border have been steadily building again since May when Armenia protested what it described as an incursion by Azerbaijani troops into its territory.
Azerbaijan insists that its soldiers were deployed to its territory in areas where the border has yet to be demarcated. Clashes have been reported ever since.
On Monday, Pashinyan accused Azerbaijan’s troops of violating the border between the two countries and sacked his defence minister over the incident. Reports of fighting, including the use of artillery, followed on Tuesday from both countries.
Al Jazeera’s Forestier-Walker said the clashes in the Nakhchivan region indicated Azerbaijan wants to perhaps “take it by force” or “ratchet up pressure on Armenia to move forward on these deals that were fleshed out with the help of Putin”.
Armenia’s Security Council has called on Russia to help protect the country’s territorial integrity.