The last time Isaias Afwerki, the only president Eritrea has ever known, signed a peace treaty with his Ethiopian counterpart was 18 years ago, in the Algerian capital Algiers. Last month, he sat down with another Ethiopian president, in another Middle Eastern coastal city, to sign another peace treaty.

The Horn of Africa has experienced a summer of love. Not for decades have the leaders of Ethiopia, Eritrea, Djibouti and Somalia met so often or exchanged such effusive words (and presidential hugs). Relations within the region, for so long divided by conflicts and border disputes, have long been frozen. Now, suddenly, there is a thaw.

It started in April when a new, youthful Ethiopian president, Abiy Ahmed, took office. Within weeks, a transformation had begun. Abiy lifted the state of emergency, released thousands of prisoners and ended the state of war with neighbouring Eritrea. A landmark meeting between him and Afwerki soon followed. Eritrea then agreed to restore diplomatic ties with Somalia.

September has witnessed the greatest flurry of activity so far. On the occasion of the Ethiopian new year, border crossings between Eritrea and Ethiopia were opened for the first time in 20 years; Ethiopia also re-opened its embassy in Asmara. The two leaders then flew to Jeddah, on Saudi Arabia’s coast, to sign a peace agreement. Djibouti and Eritrea’s presidents also agreed to normalise diplomatic relations.

At no point for three decades has peace in the Horn seemed so close. Yet it can sometimes seem as if the region wants peace so much, it has forgotten how recently it was at war. The smiles and hugs are merely the first step; there are deep-rooted tensions among the four countries that, without detailed and deliberate resolutions, could easily drag the region back to a cold, or worse a hot, war.

If it lasts, the impact of peace in the Horn will be felt across the region, and into the heart of Europe. The migrant crisis, centred around Syria, has taken a vast toll across the European continent. In some countries, like Greece, Italy, Germany and the Balkan nations, the effect has been extraordinary, as hundreds of thousands of refugees have sought safety.

But no part of Europe has escaped and the scenes of migrants drowning in the Mediterranean have had an impact on public policy discussion in every single European nation, and in many has exacerbated an anti-European Union feeling. Peace would change that, and the change would start with Eritrea, a tiny country from which, nonetheless, the second-highest number of refugees come.

Eritrea is a “fortress state” that has kept its population and the wider region in a state of war-readiness for two decades.

Eritrea has clashed seriously with all its regional neighbours, most seriously with Ethiopia, with whom it fought a bloody border war from 1998, leading to the deaths of around 70,000 people. But it also clashed militarily with Djibouti in 2008, leading to a deal that saw Qatari peacekeepers deployed for nine years; and it was accused of providing assistance to armed Islamist groups opposed to the Somali government, leading to a UN arms embargo since 2009.

Eritrea’s entire political system has been built around the threat from Ethiopia.

Citizens are subject to mandatory, indefinite military service, which has been the driving force behind so many fleeing the country. By some measures, one in 10 of all migrants crossing the Mediterranean to Europe are Eritreans, despite a relatively small population of five million. If military service is ended or eased, Eritrea could finally open up, easing the pressures on neighbours, the Middle East and Europe. That would have a knock-on effect on those European countries that offered refuge to so many, as well as having an effect on the European political discourse.

Peace would also allow Eritrea to export again – Ethiopia used to buy the vast majority of Eritrea’s exports – and offer Ethiopia, landlocked but one of the most populous countries in Africa, an easy route to the sea. That would certainly help Addis Ababa, which is facing a currency crisis.

But Ethiopia still has structural problems. Perhaps three million people are internally displaced, and ethnic tensions and disputes over scarce resources still trigger mass protests.

The root issue for the region is that, with conflicts continuing for so long, and with a constellation of small countries, each has gone its own way to seek political advantage.

This is particularly the case in Djibouti, the smallest of the Horn countries. Both the US and China have military bases in the country and China’s opaque largesse – the country has lent Djibouti more than a $1 billion since 2015 – has caused jitters. Other countries with such large debts to Beijing have found their political independence circumscribed and Djibouti has already demonstrated a predisposition to put politics ahead of international agreements, in a way that will hardly inspire foreign investors.

And then of course there is Somalia, one territory with multiple countries. The northern tip, known as Somaliland, broke away in 1991, but is not recognised by the international community. Meanwhile Mogadishu, the capital of Somalia proper, is still dangerous – a suicide bomber attacked government offices and killed six people as recently as this month.

Any or all of these issues could easily flare up. Talking peace, though it took regional leaders so long, is the easy part. For the border disputes, which have been the source of the majority of the tensions, the devil will be in the demarcation. The most destructive war in the Horn, after all, was fought over a remote, sparsely populated village on the Eritrean-Ethiopia border.

Ethiopia’s president has acknowledged as much, telling a press conference last month that the most essential political task “should be how to keep and sustain the peace, because the peace needs to be maintained”. To do that will require more than warm words; it will require the region’s leaders to accept international scrutiny and relinquish control. There will be hard questions on Eritrea’s human rights and on Ethiopia’s state-led economy.

The Cold War in the Horn of Africa has finally begun to thaw. The leaders of its four countries will now be forced to confront the tensions that have long lain beneath. It remains profoundly in Europe’s interest that they do so.