Prime Minister Margaret Thatcher, having risked a serious political setback at home and possible terrorist retaliation because of her decision to back last month's U.S. raid against Libya, is now asking to be repaid.

In a transatlantic lobbying campaign that has included Thatcher and several senior members of her Cabinet, Britain has launched a new appeal for ratification of a revised extradition treaty with the United States that has been stalled in the Senate Foreign Relations Committee for nearly a year.

The revisions, to a 1972 treaty, are designed to remove extradition exemptions for politically motivated crimes of violence such as murder and hijacking. These exceptions have resulted in shelter in the United States for Irish Republican Army fugitives.

Over the past 17 years, more than 2,400 people have died in Northern Ireland's sectarian conflict and IRA operatives have killed hundreds of British Army and police officers in the province. Civilian targets have included Thatcher, who narrowly escaped death in a 1984 bombing in Brighton, England, that killed five persons.

The IRA, which says it is fighting for the reunification of the six Northern Ireland counties with the Irish Republic to the south, considers British sovereignty over the north illegal, and Britain's Army there an occupation force. It is a definition accepted by some Irish Americans, and U.S. courts have refused to extradite convicted and alleged IRA criminals because of the political offense exemption on at least four recent occasions.

The British government had appeared content quietly to chip away at Senate opposition, which is based on both Irish American sentiments and reluctance to establish a precedent that could be applied to other extradition arrangements.

Since the Libyan attack, however, Britain has stepped up the pressure and the publicity surrounding its efforts and has sought to take advantage of a surge of antiterrorist sentiment in American public opinion.

Passage of the treaty "is not only being appreciative of past support," Thatcher said in a live interview with NBC's "Today" show Friday. "It is not only standing together as friends . . . . There is something much deeper than that. If you are against terrorism, you cannot pick and choose between terrorists."

British officials acknowledge that, as one put it, "the general perception of IRA terrorism is more serious here than in America." For many Americans, the issue of Northern Ireland remains complex and remote, and those whose voices are the loudest often are the more militant Irish lobbies sympathetic to the IRA's campaign of violence.

But for Thatcher, and many others in this country, the IRA's activities have been a long festering sore. Moreover, British officials have long charged, with the concurrence of Irish and U.S. law enforcement officials, that much of the Irish-American funding of the Catholic minority in Ulster goes into IRA coffers.

For Thatcher, ratification of the treaty also would be a major step toward proving that the "special relationship" between the two countries works both ways.

Two weeks ago, on the heels of the declaration against terrorism and backing for improved extradition procedures at the seven-nation Tokyo summit, British Northern Ireland Secretary Tom King flew to Washington to deliver the same message. He will be followed this week by Home Secretary Douglas Hurd and Foreign Secretary Geoffrey Howe.

But the problem, officials here readily admit, is not the Reagan administration, which strongly backs passage and is negotiating similar pacts with other nations -- agreement has been reached with West Germany and is expected soon with Israel. The problem is that in several committee sessions on the issue, a Democratic-led opposition bloc, along with North Carolina's Republican Sen. Jesse Helms, has opposed the revisions agreed on last June by London and Washington.

Much of the opposition has little to do with Britain and the IRA, and centers on concerns that the revisions would weaken the centuries-old U.S. tradition of sanctuary for political dissidents and set a bad precedent. Helms fears it could lead to extradition of U.S.-backed Afghan and Nicaraguan rebels into the hands of hostile leftist governments.

Irish-American political groups also have made their voices heard. While making the case for political sanctuary for IRA suspects, they also allege that the British system of justice in the north -- including nonjury trials and suspension of some rules of evidence -- leaves much to be desired.

British officials have voiced heated resentment of such charges as a slight to a fellow democracy. Nonjury trials were initiated in Northern Ireland, they point out, to eliminate intimidation against jurors that had made fair jury trials impossible.

But the stridency of some of the antitreaty lobbying has helped support the contention of treaty backers here and in Washington that many opponents are on the extreme fringe of the Irish lobby, or hostages to the perceived demands of ethnic politics.

Sen. Claiborne Pell (D-R.I.) has offered an amendment to the revised treaty that would distinguish between civilian and military targets. The provision would speed extradition of those allegedly involved in attacks against civilian targets while the current restrictions still would apply in the case of military targets. That makes it unacceptable to the British, who argue that it would allow assassinations of Army and police officers with impunity.

Earlier this month, committee chairman Sen. Richard Lugar (R-Ind.) declined once again to submit the package to the full Senate, where a two-thirds vote is needed for passage. Another effort is expected next month.

In frustration, Lugar and other Republicans have indicated that they may tie the treaty changes to approval of a $250 million U.S. aid package for Northern Ireland and the Irish Republic.