On Monday night, the Prime Minister was desperate to avoid a humiliating defeat on the Scott report, which would have triggered an embarrassing confidence motion and may well have forced the resignation of William Waldegrave and/or Sir Nicholas Lyell.
Given that the Conservatives have an overall majority of only two, and several Tories planned to vote against the Government, his best hope of survival was to win over at least some Northern Ireland Unionist MPs.
But Mr Major also wanted to save the Northern Ireland peace process, his main achievement as Prime Minister. So he had to reach an understanding with some Unionists without completely alienating Irish nationalists. That would have further complicated London's relations with Dublin and scuppered any chance of the IRA declaring a fresh ceasefire.
Had Mr Major not worried about the attitude of the Irish nationalists, his government could have done a deal with the Unionists that might have given him a more comfortable cushion of votes in the Commons. But his reputation would have been fatally compromised. He could have been accused of trading in the last chance for peace in Northern Ireland in exchange for a more comfortable Commons majority.
DUBLIN AND THE SDLP
John Major's refusal to concede to David Trimble over the Scott report has earned plaudits from nationalist Ireland, which had accused him of appeasing the Ulster Unionists by moving too slowly on the peace process. Mr Major's action on Monday is seen as a sign that the Government still values the ability of nationalists to deliver peace. The way he won the vote on Scott kept open the door to nationalists. If the Hume/Paisley method for elections is agreed, Dublin and John Hume's SDLP will be in a stronger position to persuade the IRA to call a new ceasefire.
Dublin and the SDLP expect an early date for all-party talks, probably in May, with minimal preconditions for Sinn Fein's participation, other than ceasefire. They will want London or the two governments to chair the talks. When Mr Major came up with the idea of elections in Northern Ireland, it was assumed he had antagonised the SDLP and Dublin beyond repair. That may yet prove untrue.
David Trimble's image as the modern face of Ulster Unionism has been shattered. He has been painted as a backroom-deals politician prepared to trade his support for the Government on matters of state for his own local advantage. The soundness of his political judgement is in doubt. Just as important, Mr Major seems to have successfully called his bluff: he has shown he can survive without Trimble.
But Trimble remains powerful. The peace process cannot make progress without him: the Government will have to build bridges to him.
Ian Paisley is rejuvenated, seen now as a politician with leverage. If an election in Northern Ireland turns out the way he wishes, he would become a more powerful player within the Unionist debate.
That is not necessarily good news for the peace process. The big question is whether, after years of dubbing Gerry Adams the anti-Christ, Mr Paisley would sit down with him for all-party talks. The private signals are that Mr Paisley would join all-party talks, once a ceasefire had been declared.
THE IRA AND SINN FEIN
No one knows what the IRA is planning: the security forces are preparing for a long-term return to violence. However, the Provisionals have so far hung back from an all-out resumption of their campaign: they may be waiting to see the outcome of the Anglo-Irish summit.
Politicians on both sides of the Irish Sea still hope to save the process and are trying to meet the key IRA demand for all-party talks without seeming to concede to terrorism.
The signs are that Sinn Fein would take part in a Euro-style election based on Northern Ireland as a single constituency. But it would not be allowed into talks unless there was a ceasefire.
Sinn Fein might also find it hard to agree to the six preconditions laid down by the Mitchell Commission for parties wanting to take part in talks. The most difficult would be the implicit requirement that Sinn Fein abide by whatever agreement is finally hammered out and giving up the goal of a united Ireland.
Ulster Unionism is split between two main competing parties: the three MPs in Ian Paisley's Democratic Unionist Party (DUP) and the more moderate Ulster Unionist Party (UUP), which has nine MPs. Their rivalry was John Major's opportunity.
Mr Paisley's party has had little to do with the peace process, leaving the rival UUP, under its dynamic new leader, David Trimble, to make the running.
Mr Paisley has been looking for a way to make his presence felt.
With Mr Major's plans for elections to select delegates for all-party peace talks, each Unionist wing saw a chance to gain at the expense of the other.
Mr Trimble wanted an election on the basis of traditional Westminster constituencies, in which his party always does disproportionately well (see graphs).
If he had got what he wanted, he would probably have backed Mr Major in the Scott vote. But the nationalist SDLP and Sinn Fein would have boycotted the election, which they would have seen as simply reinforcing Unionist domination.
The small political bodies linked to the loyalist paramilitaries probably would not have won a seat under this method. So Mr Major could not go down this route without endangering the peace process.
He was, however, helped by an odd coincidence of interests between two old enemies: Mr Paisley and John Hume of the SDLP.
Both do very well in elections to the European Parliament, in which Northern Ireland is treated as a single constituency electing three MEPs (see graphs). Generally, Mr Paisley tops the Euro-poll, with Mr Hume second and the UUP humiliated in third place.
Mr Hume and Mr Paisley (along with Dublin and the loyalist parties) want this system for the forthcoming election.
Mr Major's plan was to endorse this approach, in the hope that it would keep the smaller parties' interest in the peace process while also giving him enough of a margin to scrape home in the vote.
It was tight, but it appears he was right.
Victory in the Scott vote has bought John Major time. His administration will struggle on, albeit it without much of a legislative programme, beset by internal divisions and prey to perpetual revolt. More votes loom in which the Opposition could inflict defeat on the Government: in the third week of March, the Euro-rebels could again cause problems during the debate on a government White Paper outlining British policy for the European Union's Inter-governmental Conference. A Commons revolt over Lord Mackay's Bill relaxing the law on divorce is also a possibility.
The predicted Conservative defeat in the May local elections will further weaken the Government. Deaths of Tory MPs (five would normally be expected to die between now and spring 1997) will further reduce the Government's Commons majority. The forthcoming South-east Staffordshire by-election could cut his majority to just one.
Mr Major knows he cannot depend on the nine Ulster Unionist MPs to keep him in power. The rapprochement with Ian Paisley is unlikely to last long: Mr Paisley is better known for being thrown out of Downing Street than for friendly chats with the Prime Minister.
Saving the peace process may depend on what happens this week. Mr Major must agree a date for all-party talks - the condition laid by Gerry Adams for him to go back to the IRA to establish a truce. If Mr Major's luck holds, peace will return by the summer and the rest of the year will be taken up in preliminary talks. His task would be to stop them breaking down. Traditionally, talks collapse once parties refuse to budge from historic positions. Mr Major would need to keep talks going and the IRA non-violent until the general election, which he could then fight as John the Peacemaker.