A leaked Foreign Office memo published yesterday reveals that the government is to establish ties with the Muslim Brotherhood, an Islamist group banned by the Egyptian government.

Like other western countries, Britain is struggling with the dilemma posed by the electoral successes of Islamist groups either directly linked to terrorism or alleged to be fronts for violent organisations.

The memo, written on January 17 and leaked to the New Statesman, recommends increased engagement with the Egyptian Muslim Brotherhood, the oldest Islamist group in the world. The recommendation has been accepted by Jack Straw, the foreign secretary.

The memo says: "The presentation of any change in the way we deal with the Muslim Brotherhood will have to be carefully handled, in order to safeguard our bilateral relations with Egypt."

Western governments have attracted widespread criticism within the Muslim world for advocating democracy and then refusing the accept the results of the democratic process by rejecting contact with elected representatives. The debate within the Foreign Office has been provoked by the successes of the Palestinian group Hamas; the political wing of the Hizbullah guerrillas; the Muslim Brotherhood in Egypt and Sunni groups with ties to insurgents in in Iraq. The British approach differs country by country.

The Foreign Office was split last year over how to react to Hamas. The embassy in Tel Aviv opposed contact while the consulate in East Jerusalem recommended meeting elected representatives. Meetings did take place but a ban on contact is now official policy. A spokeswoman said yesterday the policy was that "contact with elected parliamentarians that use peaceful means to achieve their objectives is normal diplomatic practice".

The Foreign Office launched an inquiry yesterday into the leaking of the memo, which is marked confidential. It was written by Julie McGregor, a member of the Arab/Israel and North Africa Group, and sent to Mr Straw.

"The Egyptian government perceive the Muslim Brotherhood to be the political face of a terrorist organisation," it says, before adding that research analysts "concluded there is no evidence of the current organisation being involved in terrorist activities, although it is possible that they forward charitable donations to Hamas".

It recommends that, as well as meetings with diplomats, Muslim Brotherhood parliamentary representatives should be included "when events for medium-level British visitors take place in Egypt". It also recommends pressing the US and other members of the European Union to make contact with the Muslim Brotherhood.

The Egyptian government, while maintaining the ban on the group, allowed members to stand as independents in the election, when 88 were elected.

The memo says: "It will be difficult for us to maintain credibility for our calls on Egypt to reform towards further democracy and better governance, if we fail to engage with the largest and most effective opposition group."

Until 2002, Foreign Office diplomats held infrequent meetings with Muslim Brotherhood members of parliament. But the Egyptian authorities expressed their displeasure, the memo says. "Since 2002, we have had only occasional contacts."

The group was home to senior members of al-Qaida, including Ayman al-Zawahiri, Osama bin Laden's deputy. Although it has renounced violence, it advocates conservative religious laws and its leader, Mohammed Mahdi Akef, has said that the Holocaust is a myth.

Chris Doyle, the director of the London-based Council for Arab-British Understanding, said: "There has been a certain amount of soul-searching in the Foreign Office. If they are going to pursue the US's [promotion of] democracy line, engagement is something they've got to consider. They are already having to do it in Iraq to some extent with groups of an Islamist background. "

Violence, opposition and democracy

Muslim Brotherhood (Egypt)

Founded in 1928, it has at various times been outlawed or grudgingly tolerated. It is the most popular opposition group in Egypt and its candidates (officially standing as independents) won 20% of the seats in last year's parliamentary election.

Muslim Brotherhood (Syria)

An offshoot of the Egyptian Muslim Brotherhood, it waged an armed struggle against the Ba'athist regime until it was defeated in 1982. It has since renounced violence and called for a democratic system in Syria.

Hizbullah (Lebanon)

A Shia organisation backed by Iran and Syria, which retained its weapons after the Lebanese civil war. A UN security resolution calls for it to be disarmed. A military wing engages in sporadic conflict with Israel. Politically, it is an increasingly important player in Lebanon, winning 23 seats (out of 128) in last year's parliamentary election.

Hamas (Palestinian territories)

Highly controversial because of its suicide attacks and its non-recognition of Israel. Its victory in the Palestinian elections last month has posed a major dilemma for western countries.

Islamic Salvation Front (Algeria)

In 1991 the front won the first round of parliamentary elections which were then cancelled by the government, triggering a long and bloody conflict.

Justice and Development party (Turkey)

A nominally Islamist but primarily conservative party which won an election in 2002. Fears that it would try to Islamise Turkey, one of the most secular of Muslim states, proved generally unfounded.

Justice and Development party (Morocco)

Legalised last summer and allowed into mainstream politics after changing its name and moderating its Islamist stance. It is represented in parliament and has six women MPs.

Islamic party of Malaysia

An Islamist party engaged in mainstream politics. It won 27 seats in Malaysia's 1999 election but dropped back to seven seats in 2004.

Jamaat-e-Islami (Pakistan)

Founded in 1941, it professing to be a legitimate political party, but has links with terrorism.Brian Whitaker