Tony Blair has said the On The Runs (OTRs) scheme for fugitive IRA members probably prevented Northern Ireland's fragile peace process from collapsing.
Political talks were on a knife-edge months before the establishment of a power-sharing Stormont government with Sinn Fein and the Democratic Unionists at its helm in 2007, the former prime minister said.
His Labour administration sent about 200 letters to republicans assuring them they were not being pursued by the UK authorities following requests from the republican party.
Mr Blair told the Northern Ireland Affairs Committee of MPs: "We were fighting continually to keep the thing alive."
Mr Blair began the peace process scheme in 2000 which saw 95 of the so-called letters of comfort issued by the government to suspects linked by intelligence to almost 300 murders.
They told people they were not wanted at that time but did not rule out future prosecutions if new evidence became available.
The plan was drawn up following pressure from Sinn Fein to allow the fugitives, who had they been in prison before 1998 would have been released under the Good Friday Agreement, to return to Northern Ireland.
An investigation was launched by MPs when the prosecution of a man for the murder of four soldiers in a bombing in Hyde Park in 1982 was halted after he received one of the OTR letters in error when he was wanted by the Metropolitan Police.
Mr Blair apologised to Hyde Park victims but made no apology for sending letters to those who should have received them. He took responsibility for the structural problems with the scheme, which developed from a small to a large number of cases over many years, and said the framework could have been better. A judge said had the issues been corrected they may have prevented the Hyde Park error.
The committee, sitting in Westminster, launched its investigation after John Downey was released last year when a judge halted his prosecution for the IRA's Hyde Park bombing.
Household Cavalry Lieutenant Anthony "Denis" Daly, 23, died in the explosion alongside Trooper Simon Tipper, 19, Lance Corporal Jeffrey Young, 19, and 36-year-old Squadron Quartermaster Corporal Roy Bright.
Mr Blair said the letter should not have been issued to Mr Downey.
But the former premier told the committee at Westminster: "The issue of OTRs was absolutely critical to the peace process and at certain points became fundamental to it.
"If I had been saying we are not dealing with this in any way at all, you can never be certain of these things but I think it is likely that the process would have collapsed."
He said Sinn Fein would have walked away and added dealing with OTRs was central to republicans accepting the overhauled police service in 2007.
He said: "I thought for a time during that period we had lost the whole thing, I remember saying I think we just cannot rescue it.
"If we had not managed to find a way to get ourselves over what was a horribly difficult period we would not have got the (ministerial) Executive up in May 2007.
"We almost lost the thing. I understand the anxiety about this, I really do, but you have got to understand what I was trying to achieve.
"The Northern Ireland peace process was the right thing to do."
Mr Blair said the scheme evolved over time from a small number of cases but his focus was on what to do about those who did face prosecution.
"It was not an amnesty, it was not secret, but it nevertheless dealt with one part of the problem we had to deal with."
He said he wanted to establish a proper comprehensive system which dealt with the issue in its entirety, including those fugitives who did face prosecution, but his government was unable to do so after political opposition forced the scrapping of proposed legislation.
The former Labour leader added: "The purpose of everything we have done was to create peace in Northern Ireland so that there were not more victims of terrorism and more families distressed and losing loved ones as a result of that terrorism."
He defended completely the issuing of letters to people who the prosecuting authorities had decided were not going to be prosecuted and charged.
"We would have had literally nothing in respect of the (Sinn Fein) demand to deal with the whole of the OTRs issue."
Current Northern Ireland Secretary Theresa Villiers has ended the scheme.
The former prime minister said: "I am not here to criticise her but all I am saying to the people in Government now is that you inherited a peace process that worked so be careful with it because it is fragile still."
The committee is due to complete its report soon.