By the margin of a single vote, the Labor Party government of British Prime Minister James Callaghan was brought down in the House of Commons tonight on a motion of no confidence.

The tally of 311 to 310 against the government, with Labor losing the vote of a member of Parliament hospitalized with heart disease, forces a national election by the end of April or the beginning of May.

"Now that Parliament has declared itself," Callaghan declared immediately after the dramatic vote, "we shall take our case to the country." It was the first time in 55 years that a government has been ousted on a vote of no confidence.

Callaghan said he will see the queen at Buckingham Palace Thursday to ask for the dissolution of Parliament and then will announce the date of the election. Members of the victorious coalition of opposition parties cheered wildly, while Laborites filed out of the crowded House of Commons chamber somberly singing "The Red Flag," their party's anthem.

Conservative Party leader Margaret Thatcher engineered Callaghan's defeat. With the Conservatives leading Labor in public opinion polls following a cold winter of labor strife, she hopes to win the coming election and become Britain's first woman prime minister.

The Conservatives were joined tonight by the 13 Liberal and 11 Scotish Nationalist members of Parliament, plus 8 of the 10 Protestant Ulster Unionists from Northern Ireland.

The outcome was so close because the other two Ulster Unionists defied their party's leadership and voted with Labor and the three Welsh members of Parliament. The two Catholic Ulster members abstained as expected.

Had the ill Laborite been present and voted for Callaghan, the resultant tie would have been broken in Labor's favor by the normally non-voting Laborite speaker of the House.

Thatcher, who never smiled during the tense debate, not even when victory was won, opened six hours of arguments, that preceded the climactic vote by declaring, "The government has failed the nation, lost credibility, and it is time for it to go."

She despicted Callaghan's minority government as desperately clinging to power from week to week as it lost, one by one, the support of the minor parties that had helped keep it in office this long. "What condemns the prime minister now," Thatcher said, "is that the substance of matters before this house have taken second place to the survival of his government."

The long debate in the Commons, with members overflowing into the aisles and balconies, did not appear to change any votes. But the speeches by Thatcher and Callaghan provided a preview of the style and substance of the coming general election.

Thatcher delivered a stern lecture on what she characterized as the Labor government's contribution to "the decline of Britain" as an international power and economic competitor.

She criticized Labor for having paid "far too little attention to wealth creation and too much to its redistribution," for having "centralized too much power in the state" and stifling individual initiative, for allowing labor unions to disrupt the country and for having "shown insufficient support for the rule of law."

Thatcher called for immediate tax cuts, encouragement of investment and profit accumulation by business and stricter enforcement of the law against both criminals and labor unions that engage in "intimidation."

Wherever she goes around the country, Thatcher said, emphasizing themes that are expected to be central to her party's election campaign, "the people demand two things-less taxes and more law and other."

Callaghan replied in a more relaxed manner, joking and trading ad libs with opposition hecklers before launching sarcastic attacks on his combined opponents.

He accused the Liberals, who had previously supported the Labor government, of "spinning like a top" warning them and the other minor parties voting against him that the election they were forcing could diminish their numbers in Parliament.

"It is the first time in recorded history that turkeys have been known to vote for an early Christmas," he said.

Pointing his finger at Thatcher seated opposite him, Callaghan argued that the Conservatives had a "simplistic" and "free-for-all" approach to economic policy that he said would alienate labor unions, bankrupt industry, give away North Sea oil revenues to multinational oil companies, and short-change social welfare programs.

When the Conservatives were last in power in the early 1970s, Callaghan said, "property speculators were given a free hand and the money supply was increased to fill some pphoney finance companies," which he said, "opened one of the most disreputable eras" in London financial history. Now, Callaghan added to shouted complaints from Conservatives in the most heated moment of the debate, "some of the disreputable speculators are coming back out of their holes."

It was the prelude to what could be a bitter election campaign

Pointing to the last Conservative prime minister, Edward Heath, who sat with his chin in his hand on the Tory front bench during the debate, Callaghan said to laughter from the Labor benches, "I know the Tories want to forget 1970. He has been removed from their collective thinking like Trotsky blotted out from photographs of the Stalinist era."

Conservatives pointed across to the bench including Harold Wilson, the Labor prime minister who succeeded Heath but then retired suddenly without explanation, and shouted, "Where is he?"

Callaghan concluded by making a surprise announcement of an increase in old-age pensions to take effect in November. "Let need, not greed, be our motto," he said.

Callaghan is the first prime minister to lose a confidence vote since Ramsay MacDonald, Labor's first prime minister, was brought down in 1924. Callaghan, with the support of some of the minor parties who voted against him tonight, had survived two votes of confidence by comfortable margins in the past year.

The present Labor government dates back to 1974, when Heath was replaced by Wilson in an election in which Labor won only 301 of the 635 seats in the House of Commons. In a subsequent election that Wilson called just eight months later, Labor won 319 seats, a bare majority. Since then, deaths and defeats in by-elections have whittles Labor's strength down to 308.

After Wilson's retirement in April 1976, Callaghan used his mastery of the parliamentary maneuver and shifting alliances with various minority parties to keep his embattled government in power far longer than his opponents expected. He nearly succeeded until October, near the end of the Labor government's five-year term.

From early 1977 until late last year, Labor was formally supported by the Liberals in what was called the "Lib-Lab pact." It was during this period that Callaghan succeeded in imposing a wage-restraint policy that reduced inflation from more than 25 percent to a low of 7 percent last year. This winter's strikes, however, have produced pay raises averaging more than twice Callaghan's target ceiling of 5 percent and have forced inflation back up to nearly 10 percent.

When the Liberals withdrew their support from the government last year because they thought it was time for a new election, Callaghan found informal backing from the Scottish and Welsh nationalists while a bill for limited home rule in Scotland and Wales worked its way through Parliament. Many Ulster Unionists also supported the government while parliament was considering legislation to expand the number of Northern Ireland seats from 12 to 17 or 18.

When the home-rule plans for Scotland and Wales failed to win enough support in referendums earlier this month and were due to be repealed by Parliament and the bill for additional Ulster seats became law last week, the three parties abandoned Callaghan.