LONDON, JUNE 5 -- After a long and emotional debate that raised the ghosts of history and the shadow of antisemitism in Britain, the House of Lords early this morning overwhelmingly rejected a bill to prosecute alleged Nazi war criminals living here.

The defeat by a 207-to-74 vote, a stunning reversal of a House of Commons vote earlier this year approving the bill, marked a rare assertion of power by Parliament's upper house. The vote set off a new debate over the legitimate power of the Lords, whose members either inherit their seats or are appointed, to thwart legislative initiatives approved by the lower, elected Commons.

Prime Minister Margaret Thatcher's government now must decide whether to drop the bill or submit it again to Parliament at its next session. The government has not revived a bill voted down by the Lords since 1949.

If the Commons passed the act a second time, it would become law even if rejected again by the Lords, but the action would be unprecedented and, some observers contended, potentially damaging to the authority of the Lords.

Thatcher told the Commons this afternoon that her government would carefully consider its next step, "bearing in mind the size of the majority of this house" as well as "the extremely strong feelings because of the hideous nature of these crimes."

Britain has been debating what to do about the alleged Nazis in its midst ever since officials of the Los Angeles-based Simon Wiesenthal Center brought the government a list of 17 suspected war criminals in 1987. A government inquiry headed by Sir Thomas Hetherington, the country's former chief prosecutor, concluded last summer that there was sufficient evidence to prosecute three suspects and called for further investigation of another 121, most of them Ukrainians and citizens of the former Baltic states who allegedly collaborated with the Germans in the mass murders of Jews.

The report called for new legislation to give British courts jurisdiction over acts of murder and manslaughter committed as war crimes in Germany or German-occupied territory and to speed up judicial procedures so legal cases could be concluded before many of the aging suspects died or were too infirm to stand trial.

Many in Britain's small but influential Jewish community were reluctant to see the issue raised, fearing it might trigger antisemitism. But community leaders, including retired chief rabbi Lord Immanuel Jakobovits, supported the measure and lobbied the government. A government bill breezed through the Commons in March, 273 to 60.

But the bill ran into strong opposition from several distinguished jurists in the House of Lords, including Lord Shawcross, Britain's chief prosecutor at the Nuremburg war crime trials; Lord Hailsham, a former lord chancellor; and Lord Donaldson, who is master of the rolls. The latter two are among Britain's highest-ranking judicial officers. It was also opposed by the archbishop of Canterbury, Robert Runcie.

They argued that the bill amounted to "retroactive justice" by declaring illegal acts committed 45 years ago in another country and would condone a vengeful "witch hunt" because it would be impossible to hold fair trials so long after the alleged crimes.

During Monday night's nine-hour marathon debate, Lord Shawcross argued that those in the Commons who had approved the bill had been on average 5 years old when World War II started. He noted that Britain had suspended prosecutions in 1948 when Jewish underground fighters were attacking British troops in what was then British-ruled Palestine.

"In the atmosphere of those days it would have been impossible to continue war-crimes trials, wherever the criminals happened to be," he said. "Now younger people who had no experience of the war and perhaps have more simplistic ideas of right and wrong want us to do so.

"Of course we can now revive the policy of retribution but we cannot do so without imposing an indelible blot on every principle of British law and justice."

Proponents stressed the moral rather than legal issues. Lord Jakobovits told the chamber the vote was "an indicator of moral sensitivity in contemporary Britain."

"Some opponents of this bill are among the staunchest friends of the Jewish people," he added. "But I have got to add that so were some of those who were appeasers of the Nazis in the 1930s."

Ephraim Zuroff, the Wiesenthal Center's chief war-crimes researcher and director of its Israel office, attended the debate and afterward accused opponents of distorting the meaning of the bill, which he said would only allow trials in cases where prosecutors were convinced they had sufficient evidence.

"The message to war criminals is: 'Fellas, you got away with it up till now. Okay, you've won,' '' said Zuroff in an interview. "If the Lords had displayed one-tenth the sensitivity to the victims that they showed over the possibility of unfairness to these suspects, we would have had a much different result."