Prime Minister James Callaghan today struck a historic accord with Liberal Party members of Parliament, thereby saving his minority Labor government from defeat.

With 13 Liberals supporting the government tonight, Callaghan survived a vote of no confidence by 322 to 293. Had he rejected the deal and Liberals voted against him, Callaghan would have been forced into an election that Labor was liekly to lose.

A bitterly disappointed Margaret Thatcher, leader, of the opposition Conservatives, taunted Callaghan as a wheeler-dealer, "creeping cravenly around, putting both wings of his party up for auction at any price." Thatcher accused the prime minister of "clinging to office by political cunning" and leading a "broken-backed government."

The agreement, which also saves the Liberals from what could have been a disastrous general election, is believed to be unprecedented in Britain. It provides that party leaders David Steela dn the other Liberals will be consulted by the government before any legislation is produced.

A joint consultation committee under Michael Foot, Labor's leader of the House, will be set up, Steel and Callaghan will meet periodically and so will Labor Ministers with Liberal spokesmen in their fields.

The arrangement, dubbed an "experiment" by Callaghan and Steel, is much less than a coalition. The Liberals get no ministers nor do they hold any veto power over Labor's legislation. They get a chance to air their views at an early date and then each side is free to vote as it pleases.

The Liberals promise to back the government on confidence votes until the end of this session Parliament, probably in October.

Callaghan is now assured of at least six more months of rule that he said were needed to carry out the government's economic recovery measures.

Both party leaders were repeatedly jeered by their opposition. Feelings ran so high that the speaker threatened to throw out one particularly obstreperous Tory. But the Tory uproar was little more than letting off steam. The Labor-Liberal deal has ended for now the political crisis here.

When the confidence motion was introduced by Thatcher, Steel had suggested he wanted Labor to agree on specific pieces of legislation. But he was tamed down.

As the bargaining reached a climax, Steel sought a pledge from Callaghan that he would order his parliamentarians to vote for a bill providing ou-plar election of deputies to the Common Market assembly in Strasbourg, France, Callaghan, aware that his left wing and the party's anti-market members opposed this, refused. Steel settled for a pledge that the bill would be introduced this year, but members will be allowed to vote their conscience.

Steel, heckled by the Tories and told to sit on the Labor side of the house, explained that he had made the agreement in "the national interest," to provide economic stability and enhhance the prospects of a third year of union wage restraint.

Many observers calculate that an election now would have wiped out 10 of the 13 liberal seats. Six months from now, things could be differnet. Economic indicators such as unemployment, the stock market and the pound are beginning to improve. Callaghan would like to hold on for 18 months, but he feels that Labor's prospects will be better even if he must hold an election next fall.

Apart form the immediate fates of Callaghan, Thatcher and Steel, something new has now been added to British politics that could be a recurrent feature of the landscape.

The British voting systems - a candidate wins a seat with a plurality of votes in a constituency - has long favored two parties. A third party such as the Liberals could get 20 per cent as the total vote but end up with less than 3 per cent of the seats.

The rising demand for home rule in the ancient kingdoms of Scotland and Wales, coupled with the rivalry between Protestants and Catholics in Ulster, however, has shattered all this. Minor parties now win a substantial number of seats and the two major parties will face increasing difficulty in winning an overall majority.

So in the future, British government is likely to resemble that of democracles on the continent - Scandinavia, West Germany, the Neterhlands and Belgium - where coalitions or deals between parties are commonplace.