Former Irish taoiseach Charles Haughey did not want the bodies of three IRA members shot dead by the SAS in Gibraltar to be taken home through the Republic of Ireland, archived British papers disclosed.
An elite team opened fire in March 1988 because they believed the republicans were about to detonate a remote-controlled bomb in the tiny British territory in the Mediterranean.
The Irish leader urged that the RAF fly their remains straight to Belfast rather than allowing their families to bring them through Dublin, which would have been a propaganda coup for Sinn Fein.
His secret intervention was disclosed in Northern Ireland Office (NIO) documents newly-released by the Public Record Office of Northern Ireland (PRONI).
An official wrote: "Haughey this afternoon implored us personally through the ambassador in Dublin to ensure that the bodies of the three IRA terrorists shot in Gibraltar were kept out of the Republic at all costs.
"He made clear that he would not admit to this request in public."
An inquest found the British commandos acted within the law when they shot dead the unarmed republicans, who were hailed as martyrs by IRA supporters.
Daniel McCann, 30, Sean Savage, 24, and Mairead Farrell, 31, were gunned down as they walked towards the Spanish border.
Critics of former prime minister Margaret Thatcher's government claimed it was part of unofficial shoot-to-kill policy pursued against the IRA by crack troops.
Mr Haughey was once charged but acquitted of conspiracy to import arms for the IRA at the start of the Northern Ireland conflict in 1970.
The NIO file, released as part of the disclosure of 1991 papers, said the charismatic leader's idea following the Gibraltar killings was that the RAF would fly the bodies direct to Belfast, rather than via a charter flight to Dublin organised by the dead men's families.
A civil servant claimed: "This proposal is clearly designed to solve a problem confronting Mr Haughey.
"It has however the attraction for us that it could short-circuit the current plans of the terrorists' relatives, to whom the bodies have been released today."
It said the families wished to take the remains to Dublin to secure maximum political advantage for Sinn Fein.
"There is also no guarantee that the families can be squared in the way Mr Haughey apparently envisages, in which case we would be left in the most invidious position of appearing to countenance a dubious bargain with Sinn Fein."
The official said one of the sticking points with the families was the use of Aldergrove airport in Co Antrim, which was regarded as unionist territory.
Another civil servant said it was "inconceivable" to use the RAF to fly the bodies home.
"The problem of how to manage any problems in the Republic must be for Mr Haughey himself, after all he has done a good deal to create them."
At the trio's funerals in Belfast's Milltown cemetery, loyalist gunman Michael Stone opened fire and threw grenades at mourners, killing three and wounding 50.
Three days later, two British soldiers were seized by a mob while driving through republican west Belfast during the funerals of those killed at Milltown.
They were dragged from their car and murdered - the disturbing scenes recorded on television.