The ongoing tragedy in Syria has weighed particularly heavily on my mind over the past days. Seven years of war. At least half a million dead. More than 5 million refugees. Whichever way you look at it, the war in Syria has gone on for far too long.

The alarming events of the past week have reminded us of the severe costs of inaction. Suspicion of the use of chemical weapons in Syria, along with the escalation of fighting on several fronts, needs to be taken seriously. Not only because the international community agrees on the prohibition of chemical weapons, but most of all, because of the extensive suffering the attacks and years of warfare have inflicted on Syrian civilians.

At the same time, tough talk and threats coming from Washington and Moscow have raised the spectre of a global confrontation.

The present situation is especially alarming because it is avoidable. It is the result of a serious lack of political will among major powers to address a crisis they have played a large role in fuelling. It is high time that the international community owned up to its responsibility to help fix this mess.

For better and for worse, the UN reflects the political will of the international community and bears the responsibility to protect peace. In Syria, it has failed in its task.

For external powers, Syria is viewed as an arena to push their own interests, adding to the complexity of the conflict. This focus on geopolitical interests sidelines the humanitarian tragedy caused by the war.

The five permanent members of the UN security council need to take a long, hard look in the mirror. Throughout the war, the security council has failed to act. Veto power has been used in an irresponsible manner to obstruct and obfuscate. Permanent members have focused on scoring political points at home and with their allies, rather than building common ground and demonstrating leadership.

For external powers, Syria is viewed as an arena to push their own interests, adding to the complexity of the conflict

In 2015, Russia dramatically stepped up its involvement in Syria to save its ally. Much of the death and destruction in the country is also a direct result of this. Russia cannot escape its responsibility for the doings of the Syrian regime.

Even if building workable solutions is difficult, it is no excuse to not try. On Friday night, the US chose a forceful response. With the dust now settling, I cannot help thinking what it intends to do to revive peace talks in Syria. Military action has never produced sustainable peace. Therefore, the US and Russia, along with other external powers involved in the conflict, should engage in serious efforts to reach a common agreement on Syria without further delay. Until they do, Syria remains a reminder of the shameful inaction of the international community in the face of another crisis that could have been prevented.

Syria is a tragic mess, and the current crisis reminds us of the critical need for the UN as a forum for dialogue and peace. Accidents do happen, and with stakes as high as they are, the costs can be unimaginable. The US and Russia play an essential role in finding a way out. There is common ground to build on. No one benefits from the prospect of Syria becoming a failed state in the heart of the Middle East.

At its core, the war pits Syrians against Syrians over their shared future. No lasting agreement can be reached without involving a wide range of Syrian voices in any political process to determine their shared future. However, external players are so deeply involved in the conflict that an overarching understanding between major powers is required before an intra-Syrian political process can take place and the country can move towards peace and stability. As permanent members of the security council and as allies of the opposing camps, Russia and the US are responsible for leading this process.

I firmly believe that all conflicts can be resolved. However, without political will and the maturity to see beyond immediate gains, this cannot happen.

It is easy to agree that the use of chemical weapons is abhorrent. This agreement should not override the fact that death, destruction and misery are also delivered through bombings, starvation and sieges. It is civilians who suffer primarily as the war drags on. Ending the worst humanitarian crisis of our time needs to be the first priority for the security council.

I am a firm believer in the UN. That is why I know we can do better, for us and for Syria.

• Martti Ahtisaari is the former president of Finland, a Nobel peace prize laureate and UN diplomat