The underlying cause of the recent military clashes is that Yerevan still doesn't recognize Azerbaijan's territorial integrity and sovereignty - which includes recognizing Nagorno-Karabakh as Azeri territory. To ensure peace, a new demarcation and delimitation process must be initiated. Unfortunately, Armenia is preventing this by imposing many unreasonable preconditions.
It was Azerbaijan, supported by Turkey, that started a brutal war against Armenia in Nagorno-Karabakh. However, even after the official cessation of fighting, there is no end to Baku's ceasefire violations and aggressions against Armenians. These include cutting off natural gas supplies to the local population. So far, only Russian peacekeepers have prevented Azerbaijan from unleashing a new full-blown war.
The timing of the recent violence is suspicious. On the one hand, there are speculations that Moscow might be behind it to distract attention from recent developments in Ukraine. Then again, Baku may have seen Moscow's distraction and the EU's growing interest in Azerbaijan's gas as an opportune time to pursue its interests militarily. Either way, if the truce doesn't last there is a real danger that the Ukraine war might escalate across the Eurasian landmass.