ARTICLE AD BOX
By Emma Simpson
Business correspondent, BBC News
A former minister has told a public inquiry into the Post Office Horizon scandal that the contract for the faulty software was "fatally flawed".
Stephen Byers said he was not aware prosecutions of sub-postmasters were using evidence from Horizon when he was responsible for the Post Office.
More than 700 branch managers were given criminal convictions for stealing company money.
It has been called the most widespread miscarriage of justice in UK history.
Sub-postmasters were falsely accused of theft and false accounting based on information from the recently installed computer system, Horizon, which was later found to have flaws.
Dozens of convictions have since been overturned and many sub-postmasters are in line for compensation.
Mr Byers, who was Secretary of State at the Department for Trade and Industry between December 1998 and June 2001, is the first former government minister to give evidence to the inquiry.
He described the treatment of sub-postmasters as "shocking".
"I would like to offer my sincere regrets for what has occurred and to say sorry for the hurt suffered by those involved. We must do all we can to ensure this never happens again," he said.
The inquiry also heard there were "significant disagreements" between the Labour government's departments involved in Horizon's future, which originally included the development of a new benefit payment card for the Department for Social Security.
He was also asked if he had been aware of any of the concerns raised in the procurement and tendering process for the project.
He said there was a protocol where members of a new government weren't able to see documents or papers provided to the previous administration, so this meant he and his fellow ministers weren't able to see any details of the tendering process or any difficulties already experienced with Horizon.
"It was all denied to us... it was a veil we couldn't lift," he said.
Mr Byers suggested cancelling the contract with Fujitsu, the Japanese firm that developed the Horizon software, would have resulted in huge losses and there was also concern about the effect on foreign investment.
In his witness statement, he noted that it had been made "very clear" that cancelling would have major repercussions for the UK's relationship, not only with Fujitsu, a big investor at the time, but also with other Japanese multinationals like Nissan and Toyota who operated UK car plants.
But when asked about this point, Mr Byers replied: "Too much could be made of that."
He also said that automation of the Post Office network was seen as vital to its future and that it would have been necessary to develop a similar programme, which could have taken several years and cost even more money.
Cancelling Horizon would have had a "devastating impact", he suggested, adding: "We had to make the most of a very difficult situation which is what I think we tried to do."
The government, he said, had insisted on live trials of Horizon to ensure the system worked and that procedures had been put in place to make sure ministers were alerted if any problems arose.
Mr Byers said he did not recall any significant concerns about technical issues with Horizon being flagged during the remainder of his time as secretary of state.
In written evidence heard by the inquiry on Thursday, former Prime Minister Tony Blair said that while he had "very limited recollection" of the events around that time, he did remember some concerns were raised about Horizon's reliability.
"I recall making clear that if the problems with the project related solely to commercial aspects then I was content to continue to work to try to find a way forward, but if there were concerns about product reliability then we should not. I recall that I subsequently received the necessary reassurances as to reliability," he wrote.
He was also asked about what he understood at the time to be the key lessons learned from the scandal.
"I have learned that it is crucial to obtain advice from experts with deep experience in the field who can provide the necessary assurance. As I have explained, I sought and obtained assurances as to the reliability of the product being developed.
"It is now clear that the Horizon product was seriously flawed, leading to tragic and completely unacceptable consequences, and I have deep sympathy for those affected."