Image copyright PA Image caption Margaret Thatcher and Dr Garret Fitzgerald signed the Anglo Irish Agreement which gave Ireland a say in the affairs of Northern Ireland on 15 November 1985 at Hillsborough Castle, County Down

The Northern Ireland Office (NIO) had concerns about Margaret Thatcher's commitment to the Anglo Irish Agreement, previously confidential files have revealed.

In a briefing note, an NIO official hinted at the prime minister's ambivalence over the document.

The 1985 treaty gave the Republic of Ireland a say in NI affairs.

The hand-written note was contained in documents released by the Public Record Office in Belfast.

It was released as part of the phasing-in of a '20-year rule' which will replace the '30-year rule' for releasing confidential files, which has previously been in place.

The note was written by R J Andrew and addressed to the Secretary of State Tom King on 29 October 1985.

Mr Andrew's concern, just two weeks before the historic document was signed on 15 November 1985, was written at the bottom of a page.

Stressing that the prime minister must play a prominent role "to get a steadying message across to unionist moderates", he told King: 'Her response, indicating that she is uncertain about opening the Parliamentary debate [on the signed Agreement] is disturbing: her wholehearted support for the Agreement is essential [sic]."

Image copyright PA Image caption Margaret Thatcher, pictured at the signing of the Anglo Irish Agreement with from left to right, Irish Foreign Minister Dick Spring, Taoiseach Dr Garret Fitzgerald, Foreign Secretary Geoffrey Howe and Northern Ireland Secretary of State Tom King

Mr King's lack of enthusiasm for the Anglo Irish Agreement was also revealed.

In a long memo to Mrs Thatcher on 27 September 1985, the Northern Ireland secretary reminded her that he had not been involved in the detailed negotiations surrounding the Agreement - this had fallen to his predecessor, Douglas Hurd - and that the arguments for and against an Agreement were "finely balanced".

In particular, Mr King was strongly opposed to mixed (British-Irish) courts - an Irish demand - and determined to "eliminate any suggestion" that the proposed inter-governmental conference had any executive responsibility for NI affairs, especially over security.

Mr King wrote: "I am sure that we are right to seek an agreement that will bring us benefits. But we must satisfy ourselves that both the Agreement and the arrangements for implementing it will do this without unwelcome or unmanageable consequences, particularly in handling the unionist reaction."

Referring to recent meetings with the Taoiseach (Irish prime minister), Dr FitzGerald and his Foreign Minister, Peter Barry, Mr King declared that the Agreement, as it stood, struck him "as offering considerably more to the Irish than it does to us".

It would certainly be perceived as such by the unionists.

He told the prime minister: "The Irish are being given an unprecedented foothold in the internal affairs of a part of UK. This must be balanced by some comparable benefit to the advantage of the UK generally and of the majority [unionist] community."

The secretary of the state reminded Mrs Thatcher that the Irish had felt unable to surrender their constitutional claim to Northern Ireland.

Against this reality, he went on, unionists were bound to feel that there was an imbalance in the Agreement.

In his view, the location of Irish officials in a Belfast secretariat from the outset "would be asking for trouble" while any formal input from Dublin on parades would "act as a red rag to the unionists".