For decades, Martin McGuinness was the despair of the British political and military establishments, which regarded him and Gerry Adams as the men who controlled Sinn Féin and, more importantly, the IRA.
They knew where he lived and could watch him making speeches and see him giving TV interviews. He was a primary target for surveillance: they tapped his phone and installed a highly sophisticated listening device in at least one of his cars.
Over the years, the intelligence agencies pressed their informers and agents within the IRA for information on him. There was intelligence in plenty: they must have amassed rooms full of material on him. Yet, although the authorities believed he headed the IRA, to their intense frustration, they could not prove it.
There was never enough to secure a conviction in court, with the result that Mr McGuinness was never behind bars after the mid-1970s. Everybody knew, or thought they knew, Mr McGuinness was IRA -- but nobody could prove it.
It was in the early '70s, as he was jailed in the Republic, that he publicly and defiantly declared he was an IRA member.
Apart from that, it was not until the Saville inquiry into Bloody Sunday that he formally admitted to being second-in-command of the IRA in Derry at the time of the 1972 shootings. He did so with great reluctance.
Lord Saville's inquiry had been under way for two years before he made a full statement. By that stage the judge had established so much credibility among northern nationalists, especially in Derry itself, that he had no option but to come forward.
Lord Saville was clearly intent on carrying out a thorough and open-minded investigation. But to complete the picture it was necessary for the IRA to give its version of events, and to testify that its members had not opened fire on Bloody Sunday.
Continuing silence from the IRA would have seriously detracted from the authority of the eventual report and made it appear that the organisation had something to hide. It was, therefore, politically essential for Mr McGuinness to step forward.
When he did so, he delivered what the judge evidently found a convincing performance. But without the imperative of the Saville inquiry -- and the immunity from prosecution it afforded -- he might never had made his admissions.
He confined his evidence to the events of Bloody Sunday, giving no testimony about other specific events before or afterwards, and maintaining he had left the IRA by 1974. This departure date covers his two jail sentences in the Republic in the early 1970s.
Since he had risen to the rank of second-in-command at the time of Bloody Sunday in January 1972, it is reasonable to assume that he was active in the IRA for at least six months prior to it. He also has not denied he remained in the IRA for at least six months afterwards.
An examination of the IRA campaign in Derry for this period shows that, in the six months leading up Bloody Sunday, it killed nine soldiers and two police officers. In the following six months, it killed 10 more soldiers in shootings and bombings.
The organisation was noted for causing fewer civilian casualties than the IRA in Belfast and elsewhere and, in fact, during this period killed no civilians. It was also noted for causing major destruction in the city centre with a bombing campaign, which flattened a large number of buildings. It was famously said the city looked as if it had been bombed from the air.
At least seven IRA members died over this period, while the army killed a number of people, several of them in controversial circumstances. So too did the Official IRA, which was then active.
A few months after Bloody Sunday, Mr McGuinness and Mr Adams were among a delegation flown secretly to London for exploratory talks.
Mr McGuinness recounted: "Six of us were taken in a blacked-out van to a field in which a helicopter landed. We were landed at the military end of Aldergrove airport and an RAF captain or major, I don't know what he was, stood there and saluted us on to the plane. It was a most unreal experience."
The republicans were whisked to Chelsea for a secret meeting with Northern Ireland Secretary William Whitelaw. He recalled in his memoirs: "The meeting was a non-event. The IRA leaders simply made impossible demands, which I told them the British government would never concede.
"They were, in fact, still in a mood of defiance and determination to carry on until their absurd ultimatums were met."
As the years passed, Mr McGuinness became expert in making militant statements while keeping on the right side of legality.
One of the times he spoke most frankly came in 1986, during a tense debate on whether Sinn Fein should drop its traditional abstentionism. Mr McGuinness and Mr Adams argued -- correctly, as can now be seen -- that taking Dail seats would greatly increase the Sinn Fein vote.
The fact that this was a crucial part of their strategy led Mr McGuinness to be less guarded than usual, declaring in a speech which was taken as the authentic voice of the IRA that "the war against British rule must continue".
He was rarely so specific, though he did once say he had been "fired at by the British army on countless occasions over the last 20 years".
He also said he had been stalked by a loyalist assassin. This was Michael Stone, the Ulster Defence Association member who was convicted of six murders after attacking an IRA funeral at Belfast's Milltown cemetery in 1988.
In a lengthy statement to police, Mr Stone said he had been shown documents saying Mr McGuinness was "head of the northern command of the IRA". In his chilling account, he told of going to Derry to stalk the republican: "I took particular interest in McGuinness's house as I intended shooting him through the bathroom window," he said.
"I decided not to shoot him at the school because of the children. It was decided to give him a 'head shot' at a newsagent's shop in Bishop Street as this was the most convenient place to do it as he went to the newsagent every morning.
"I arrived at the scene at about 8.35am and parked about 20ft from the shop. I had a .38 revolver in my pocket and an Armalite rifle across the back seat covered by a blanket. I sat there until 9.15am. McGuinness failed to turn up. I went back to Belfast."
Mr Stone was not the only loyalist who thought Mr McGuinness was an important IRA figure: the Rev Ian Paisley made no secret of the fact that he did too, both before and after going into government with him.
In one of numerous barbed statements, Mr Paisley's son Ian, a Westminster MP, said of Mr McGuinness: "His agenda in the past was to murder his way to a united Ireland. I have some satisfaction that he failed."
Even though British ministers and officials have often paid recent tribute to Mr McGuinness's record as a peacemaker, they have also made no secret of their view of his former activities.
David Cameron confessed: "I do find it painful that I now sometimes sit around a table with Martin McGuinness and I think about what that man did. But that is the price we are paying for peace, and it is a price that is worth paying."
Tony Blair's aide Alastair Campbell echoed David Cameron's feelings when he wrote: "You knew he had done some pretty dreadful things in his time. But Northern Ireland is a much better place than it was, and he is among the people who can take a fair share of the credit for that."
Jonathan Powell, Tony Blair's chief of staff, wrote that Gerry Adams was "more cerebral, while McGuinness was more popular with the military volunteers". He added that Mr McGuinness seemed to have "more first-hand operational experience".
In his memoirs, John Major wrote, with some scorn, that in contacts with his officials "McGuinness took up the farcical position that he did not represent the IRA and had no control or influence over them".
One Chief Constable said the McGuinness-Adams team had "a major say in the conduct overall of the republican thrust". Another said Mr McGuinness had long been "very central to what is going on".
A nuanced view was expressed by Mr Blair, who spent many hours in face-to-face negotiations with Mr McGuinness and Mr Adams. He later said of them: "A lot was written about the Provisional Army Council and their membership of it and thus their relationship with the IRA."
A large part of British intelligence, he wrote, thought Sinn Fein and the IRA were indistinguishable, but he himself believed the relationship was more complex than that. He added: "My sense was that, in certain situations, they were persuading and negotiating with others, not giving orders."
Before one early McGuinness meeting, with senior civil servant Quentin Thomas, officials were nervous that Mr McGuinness might be armed.
Mr Thomas dismissed the idea of requiring the Sinn Fein delegation to pass through metal detectors. He later made a joke of the episode: "I suggested that this was a mistake though, if Martin McGuinness was to come in and pull a gun and plug me, I would have to conclude that our analysis was based on a false premise."
During this presidential campaign, Mr McGuinness has insisted that he departed from the IRA in 1974, even though not many seem to believe him.
Perhaps his primary concern is that increased frankness would leave him open to prosecution. "Cold cases" crop up quite frequently in Northern Ireland, with various investigations going back for decades. Earlier this year, for example, a loyalist was jailed for life for the murder of a Catholic in 1973.
An open McGuinness admission that he was in the IRA for decades rather than a few years might well lead to his arrest. It could leave him open to a charge of IRA membership, or other charges such as that of directing terrorism.
He and Sinn Fein would have wanted at all costs to avoid the sensational spectacle of Mr McGuinness being arrested and possibly charged during the presidential campaign. His status as a peacemaker, and as Northern Ireland deputy first minister, would be no defence in law against past actions.
So the calculation may have been that he simply has to tough out the questions about his IRA record.
He will hope that the issue will subside in the later weeks of the campaign, and that potential McGuinness voters will conclude that his peace record will supersede his war record.