What is the St Andrews agreement?

The St Andrews agreement - which has yet to be agreed by the Democratic Unionists or Sinn Féin, the largest parties in Northern Irish politics - contains two basic elements.

First, the document includes a timetable leading towards the restoration of devolution and power-sharing in the province, which has been under direct rule since 2002.

By November 10, the parties must accept the document, and they must meet to nominate the new first minister - expected to be the Rev Ian Paisley, leader of the DUP - and the deputy first minister, expected to be Martin McGuiness, Sinn Féin's chief negotiator.

A referendum or election to the assembly would follow in March next year, with party leaders nominating members of the executive on March 14 and power returning to Stormont on March 26.

If, however, there is no agreement by November 24, the agreement makes clear that British and Irish governments would work together to implement a "Plan B" over the heads of the Northern Irish politicians.

The St Andrews agreement also details the difficult issues which need to be agreed upon by both major parties in order to fulfil this timetable.

These issues are:

· Policing, an issue most controversial for Sinn Féin. All parties must agree to support the Police Service of Northern Ireland - the successor to the Royal Ulster Constabulary, which was seen as favouring unionists - with a view to Stormont taking control of policing by May 2008.

· Acceptance of power-sharing, the most difficult issue for the DUP, which has been unwilling to go into government with Sinn Féin. The DUP has viewed the party's transformation from political wing of an armed movement - the IRA - to a peaceful, democratic political party as incomplete.

· Changes to the Stormont institutions, including possible changes to the roles of first minister and deputy first minister, the implementation of a statutory ministerial code, and other more technical matters.

· Human rights, covering rural and urban deprivation, a possible bill of rights, an equality bill, an act to "protect the development of the Irish language", a review of parades policy, re-integration of former prisoners, and other issues.

· Finance, with promises held out to the parties of a meeting with Gordon Brown to discuss the funding of Northern Ireland, increased north/south economic co-operation and a British promise to cap domestic rates, the province's equivalent of council tax.

Peter Hain, the Northern Ireland secretary, must now wait for a response from the DUP and Sinn Féin.

The deal depends on these two parties - rather than the more moderate Ulster Unionists and SDLP, who were involved in negotiating the 1998 Good Friday agreement - because Mr Paisley and Gerry Adams's parties emerged strongest from the last round of Stormont elections, in 2003.