John Major last night won the critical Commons vote on Sir Richard Scott's arms-to-Iraq report by a single vote in a wafer-thin victory which lifted a looming threat to the jobs of William Waldegrave, Chief Secretary to the Treasury and Sir Nicholas Lyell, the Attorney General.
The Commons victory - albeit by just 320 votes to 319 - came as a huge relief to ministers after a night of high-wire drama for the Government in which all nine Ulster Unionist MPs finally decided to line up with the Opposition against after John Major refused them fresh concessions on the Northern Ireland peace process.
The victory followed a massive last-minute push by whips and Cabinet ministers, which whittled down a Tory revolt to just three MPs: Quentin Davies, Richard Shepherd, and Peter Thurnham - the dissident and now independent backbencher who had already resigned the whip last week.
Rupert Allason, the spy-writer and maverick MP for Torbay, finally voted in the Government lobby - thus turning a potential defeat into victory. He had earlier appeared certain not to support the Government and had publicly declared that the Scott report showed there had been a "conspiracy" to subvert justice in the Matrix Churchill trial.
The victory, which saw every party in the Commons at full strength, apart from the three abstaining Democratic Unionist Party MPs, averted a full- scale crisis in which the Government would have been forced to table a confidence vote to ensure its survival. Ian Lang, President of the Board of Trade, had reinforced an appeal to his own party to back the Government by announcing a limited review of possible changes in Whitehall procedure, as recommended by Sir Richard's report.
Mr Lang promised a review of ministerial openness in dealing with parliamentary inquiries about arms sales; improvements in the distribution of intelligence material between government departments; and a possible reappraisal of the use by ministers of Public Interest Immunity (PII) certificates, the so-called "gagging orders" used in the Matrix Churchill trial which triggered the Scott inquiry. The one firm pledge which he gave was for greater supervision by the Attorney General's office of Customs and Excise prosecutions.
In another last minute concession which appeared to have swung Mr Allason behind the Government, Roger Freeman, Public Services Minister, gave an assurance that in the use of PII certificates there should be a presumption that the documents would be disclosed, and promised a debate on the issue.
The arm-twisting before last night's vote was seriously complicated for the Government by its parallel efforts to secure outline agreement between the constitutional parties in Northern Ireland in time to finalise a summit tomorrow between John Major and John Bruton, the Irish Prime Minister.
The Prime Minister's appeal for support at an early evening meeting with Mr Trimble was hindered by suspicions within the UUP that the Government was preparing to agree to a formula for Northern Ireland elections which it opposes, and which involves treating the whole province as a single constituency. That method is the one favoured by both Ian Paisley's Democratic Unionist Party and the nationalist SDLP.
Mr Major made it clear to Mr Trimble that he was not prepared to trade a promise on the form of elections as the price of support in the vote and Sir Patrick Mayhew, the Secretary of State for Northern Ireland, said the Government had rejected any "clandestine deals".
Instead, Sir Patrick wrote to the UUP promising that no final decision had been taken on the form of elections - which are intended to lead directly to all-party negotiations. The UUP was told that the form of the elections could be thrashed out in so-called "high-intensity talks". That assurance failed to satisfy David Trimble, the party's leader.
Mr Trimble - who had expressed strong concern over Sir Richard's Scott's findings on Sir Nicholas Lyell's conduct of the Matrix Churchill trial - insisted last night that his party had voted exclusively on the merits of the Scott issue. But the UUP's rift with the other two parties over the form of elections could cast a shadow over efforts by Dublin and London to reach agreement before Wednesday's planned summit.
The Government is now proposing two firm starting dates for all-party talks - either seven or 12 weeks after agreement is reached to go ahead with the process of elections and a probable referendum.
Tory backbenchers, and many ministers, had earlier sat glum- faced as Robin Cook, the shadow Foreign Secretary, in one of the most formidably persuasive Commons performances for more than a decade, appealed to Tory MPs to vote against the Government. "They should not look at tonight's vote as to whether or not it is a defeat for the Government. They should look on it as a vote which will decide the quality of the democracy in which we live."
Mr Cook said that if Tories did vote for the Government "they will convince the public outside that this is an arrogant Government that has been in power too long to remember that it is accountable, accountable to the people, and the time has come when the people must turn them all out of office".
Mr Shepherd said"page after page" of the 1,800-pagereport "resound with criticisms of the conduct of public business". He asked: "Is anyone accountable for this? Is anyone responsible?"
As the nine Ulster Unionist MPs kept ministers on tenterhooks, Lady Thatcher, in her first public reaction to the Scott report, took issue in the Lords with one of Sir Richard's central findings - that the 1985 guidelines on arms exports to Iran and Iraq were changed in 1988. "If there was no change in the guidelines - and there was not - then the question of deliberately misleading the House does not arise," she said.
Mr Major avoided public gloating, but said: "I have consistently acted to open the public sector up to scrutiny... I intend to continue to do so."