WASHINGTON  One by one, top executives of American oil companies met privately over the last year with Libya’s leader, Col. Muammar el-Qaddafi, often in his signature Bedouin tent, as they lined up contracts allowing them to tap into the country’s oil reserves.

But now, the new allies are working Capitol Hill, trying to weaken a law that threatens those deals. The Libyan government, once a pariah, and the American oil industry have hired high-profile lobbyists, buttonholed lawmakers and enlisted help from the Bush administration, all in an effort to win an exemption from a law that Congress passed in January that is intended to ensure that victims of terrorist attacks are compensated.

The law allows victims of state-sponsored terrorism to collect court judgments by seizing foreign assets in the United States or money from those governments held by American companies doing business with them. If Libya loses a half-dozen court cases still pending, $3 billion to $6 billion could be at stake, according to lawyers’ estimates.

“Libya is the first country in history to come out and denounce weapons of mass destruction,” said Ali S. Aujali, Libya’s ambassador to the United States. “We have worked very closely with the United States in recent years to fight terrorism. And now to be treated in this way, I feel like we are back to Square One.”