The US Supreme Court ruled last week that giving support to groups listed as terrorist is illegal, even if that support is designed to end violence.

The upshot is that work to end the world's ongoing armed conflicts through peaceful means - mediation support, or training in how to peacefully resolve disputes - comes with a risk of 15 years in prison.

Image caption The US favours talking to the Taliban, but NGOs could be penalised The US government and its allies have been calling for inclusive and political solutions to the world's most intractable conflicts - this sometimes means talking to 'terrorists' Andy Carl

The quiet diplomacy with IRA and loyalist paramilitaries which helped bring about the Good Friday agreement - meetings, training seminars and facilitated dialogues - would now be deemed a terrorist offence.

Those who engaged with the Sunni Awakening Councils in Iraq may, it turns out, have been breaking the law.

And those who are currently supporting the Afghan or Somali governments' policies of engagement with their sworn enemies could be at risk of prosecution.

This clarification of a law first adopted in 1996 and adjusted in the 2001 Patriot Act, is a big setback for American organisations well known for their work in mediation, such as the Carter Center, the American Friends Service Committee or the Conflict Management Group.

The long arm of US justice means that it extends to all of its residents and citizens (including those living abroad, like myself) and those organisations that receive US government funding.

Perverse logic

The UK, unfortunately, has similar laws.

Image caption It's still legal to talk to some militants in the Philippines - but not to others

The Terrorism Act 2000 makes it illegal to hold meetings not considered "genuinely benign" (a worryingly vague phrase) with terrorist-listed organisations. The UK Charity Commission, meanwhile, has issued guidelines to encourage whistle-blowing if any NGOs are suspected of operating outside this law.

The EU also keeps a list of groups categorised as terrorist.

It's not always clear why some armed groups are on these lists, and others are not.

The Sudan Peoples' Liberation Army, the Moro Islamic Liberation Front (MILF) or the Free Aceh Movement, for example, are not, allowing governments and NGOs such as my own, to legally provide advice in supporting their engagement in peace processes.

A recent example is our involvement in the International Contact Group in support of the negotiations in the Southern Philippines. Our role is to help the parties themselves to draw lessons from other peace processes.

Although these laws have a counter-insurgency logic (denying aid and training to militants) they are also having perverse consequences - beginning with creating a disincentive for mediation and compromise in conflict zones.

Swiss freedom

Image caption Persuading armed groups to give up land mines is now in many cases illegal

Not surprisingly, US and British NGOs and government agencies have introduced a degree of self-censure, taking themselves out of the job of facilitating peace talks, and instead leaving the jobs to governments and NGOs in countries without similar legislation or the EU's terrorist lists.

It is no accident that the avant-garde of peace mediation can be found in Norway and Switzerland.

The humanitarian logic is clear. If civilians are to be protected from organised armed conflict then there will have to be engagement with armed groups.

If NGOs like Geneva Call were based in almost any country other than Switzerland, they simply wouldn't be able to do their essential work of attempting to get the commitment of armed groups to ban the use of land mines.

What we have seen in our own work with armed groups and in documenting peace processes is that these peaceful forms of engagement tend to strengthen the pro-dialogue elements within a group, while their absence tends to strengthen hardliners by removing viable alternatives to violence.

It is essential that our policy makers develop more nuanced legal instruments, which condemn and discourage violence but keep the door open for peace talks.

Closing options

The UN itself has similar policies and lists which led to the infamous resignation in 2007, of UN Special Co-ordinator for the Middle East peace process, Alvaro de Soto. He complained that his inability to meet with Hamas had meant that it was no longer possible for the Secretary General's office to play its neutral mediation role in the Middle East.

The US government and its allies have been calling for inclusive and political solutions to the world's most intractable conflicts.

TERRORIST ORGANISATIONS US State Department lists 45 organisations, from al-Qaeda to the Real IRA

The EU lists 59 individuals and 47 organisations

The UK lists 56 organisations

Only 10 organisations feature an all three (US, UK, and EU) lists

To achieve this, it sometimes means talking to "terrorists" and certainly supporting policies whereby armed groups join the political process and abide by the rule of law.

So, in pursuit of legitimate concerns to curb the use of violence and terror, why make human rights and mediation a casualty? Closing off such options can have the reverse and perverse effect of encouraging extremism and belligerence.

Peacebuilding work, already dangerous to do and difficult to fund just got harder.

Conciliation Resources is an independent charity working internationally to prevent violent conflict, promote justice and build lasting peace in war-torn societies.