British Prime Minister Margaret Thatcher repeated to Congress yesterday her "firm support" of President Reagan's "Star Wars" Strategic Defense Initiative, saying "it is essential that our research and capacity do not fall behind the work being done by the Soviet Union."

Thatcher's endorsement during a joint session of Congress was important to Reagan, who is seeking to allay Western European concerns that the SDI program will impede progress in U.S.-Soviet arms negotiations to begin in Geneva March 12.

In her wide-ranging speech, Thatcher also said that "so long as a majority of the people of Northern Ireland wish to remain part of the United Kingdom, their wishes will be respected."

She condemned the outlawed Provisional Irish Republican Army as a "terrorist group" seeking contributions from American supporters "to buy the deaths of Irishmen."

On the arms-control issue, Thatcher made clear her belief that reliance on strategic and medium-range missiles capable of wreaking destruction on the Soviet Union must remain the primary form of western nuclear deterrence for the foreseeable future.

She noted that the last British prime minister to speak before both houses of Congress was Winston Churchill in 1952.

On that occasion, she recalled, Churchill warned: "Be careful above all things not to let go of the atomic weapon until you are sure, and more than sure, that other means of preserving the peace are in your hands."

"Thirty-three years on, these weapons are still keeping the peace," Thatcher said.

"Since then the technology has moved on . . . . That is why I firmly support President Reagan's decision to pursue research into defense against ballistic nuclear missiles -- the Strategic Defense Initiative."

Government leaders in France and, to a lesser extent, West Germany have expressed concern about the long-range implications of Reagan's determination to pursue the SDI.

They worry not only about the effect on arms negotiations but also that, if the United States develops a defensive system capable of protecting itself from nuclear attack, it might leave Western Europe to defend itself.

Thatcher has shared some of those concerns.

In a meeting at Camp David last Dec. 22, however, she obtained Reagan's agreement that no antimissile defense systems would be deployed without future negotiations with the Soviet Union.

"Let us be under no illusions," she said, "it is our strength, not their good will, that has brought the Soviet Union to the negotiating table in Geneva."

The Geneva talks are to deal with three areas of arms control: intercontinental strategic nuclear missiles, medium-range nuclear missiles and space weapons. The United States has made clear that it hopes to achieve substantial reductions in the two categories of missiles, but the Soviets, emphasizing space weaponry concerns, want to press the United States to halt its SDI research.

Britain has its own nuclear weapons and is looking toward modernizing them.

Following her congressional address, Thatcher met with Reagan at the White House.

A senior U.S. official, who briefed reporters afterward on condition that he not be identified, said they had agreed that the Soviet strategy in Geneva will be to hold "hostage" progress on missile reductions in return for U.S. agreement to abandon the SDI. The official said they also agreed that the western alliance must guard against such Soviet moves by maintaining its strength "for the foreseeable future."

In her speech, Thatcher also referred indirectly to the effects of continuing U.S. budget deficits and the skyrocketing value of the U.S. dollar on European efforts to dig out of economic recession.

She did that by talking about the need of Third World countries to reorder their spending priorities, adding pointedly: "We cannot preach economic adjustment to them and refuse to practice it at home."

British officials accompanying Thatcher said she deliberately chose that course as a way of raising the subject without bringing fiscal policy differences between the administration and Western European governments into the open. Instead, she said only that "no other country in the world can be immune from the U.S. deficit's effects."

In her speech and her meeting with Reagan, Thatcher paid tribute to Irish Prime Minister Garret FitzGerald's "courage" Tuesday in pushing through the Irish Parliament emergency legislation permitting the Dublin government to seize bank accounts believed to belong to the IRA.

She appealed to Irish Americans who want Northern Ireland united with the Republic of Ireland not to contribute to the IRA.

"The fact is," she said, "that money is used to buy the deaths of Irishmen, north and south of the border -- and 70 percent of those killed by the IRA are Irishmen," she said.