Under fire from the Senate, a well-financed insurance industry, local ministers and the Moral Majority, the champions of the District's controversial law prohibiting insurers from requiring AIDS virus tests signaled yesterday that the law may have to be changed.

Although at least half a dozen states restrict testing, the District law is the most sweeping and bars tests not only for exposure to the AIDS virus, but related tests that measure the functioning of the immune system.

Until now, Mayor Marion Barry and D.C. Council leaders have been reluctant to change the law, which was passed in 1986 at the behest of the city's influential gay community and prompted most major insurance companies to discontinue writing life insurance policies in the District.

But the Senate's 55-to-44 vote Wednesday in favor of an amendment to freeze all spending by the District Dec. 31 unless the law is repealed jarred city officials and likely will force an accommodation with the insurance industry, according to some officials and gay activists.

Regardless of whether the amendment introduced by Sen. Jesse Helms (R-N.C.) survives House-Senate conference deliberations, opponents of the law say the Senate action greatly strengthened their bargaining position in seeking changes to permit AIDS testing for insurance.

"It certainly can provide leverage because it brings the problem to the fore," said Leslie Jackson, of the D.C. Life Underwriters Association. "I don't think the D.C. Council is even thinking about it anymore. If the Congress throws it back at them, they've got to think about it. Maybe they'll listen to reason this time."

Council Chairman David A. Clarke indicated that it was possible the council would amend the law this year, but not unless the major insurance companies pledge to resume writing life insurance policies in the District.

"We're going to have to wait to see what Congress does," Clarke said. "If we're going to amend it, we want to try to achieve protection for as many people as possible while attracting insurance companies back to Washington . . . . I don't see any reason to go forward without {the industry's promise to return} on the table."

Julius W. Hobson Jr., the mayor's chief lobbyist on Capitol Hill, said that D.C. officials, insurance representatives and gay activists have been discussing possible changes in the law for months. "That process may speed up if there's concern that this {Helms'} amendment or something like it could make it," Hobson said.

Sen. Christopher J. Dodd (D-Conn.), who opposed a similar effort a year ago to overturn the legislation but voted in favor of the amendment this time, is part of the growing sentiment on Capitol Hill to change the D.C. insurance law.

Dodd, a champion of the insurance industry who received $73,000 in contributions from insurance political action committees during the past two years, initially opposed efforts to overturn the law out of concern for the District's home rule prerogatives. Fed up that District officials had failed to respond to congressional concerns last year, Dodd this week was one of 19 Democrats who supported Helms' measure, which was approved as a rider to the fiscal 1988 D.C. appropriations bill.

"The senator is reluctant to take any action that would abridge the District's home rule, but this is a sloppily drawn statute that imposes needless hardships on D.C. insurance consumers," said Jason Isaacson, Dodd's press secretary.

Jay Anguff, an official with the National Insurance Consumer Organization, said yesterday his group supports insurance firms in their fight against the D.C. law.

"It pains me to say it, because the insurance industry is almost always wrong, but they do have a point," he said. " . . . In this case, when insurers want to test for the AIDS virus, they're doing what they're supposed to be doing, which is selling insurance based on risk."

The D.C. law is the toughest of its kind in the nation. Since 1985, California has severely restricted the type of AIDS testing for life or health insurance. Officials in New York recently announced a plan to ban testing for life insurance, an action the American Council of Life Insurance is challenging in court.

Gay activists say that the insurance industry has singled out the District because it is a small and not particularly lucrative market, which will serve as a warning to other states now considering testing restrictions. Furthermore, they say, some who desire insurance are buying policies in Virginia or Maryland.

"D.C. is a very easy target," said Benjamin Schatz, an attorney for the National Gay Rights Advocates, a public interest law firm based in San Francisco. "The industry has admitted that they're doing fine in California and they wouldn't dream of pulling out there. I think this is a political attempt to try and reverse the trend toward barring testing."

Local gay activists say that discussions with city officials and insurance industry representatives about modifying the law have been under way for several months.

"There has been some slow movement, but so far we haven't reached an agreement," said Stephen Smith, chairman of the Metropolitan Washington Committee on AIDS Issues. "I still think that the law will be modified in a way that will meet the concern the industry has voiced."

One possible compromise, Smith said, is that companies could require testing for large policies, but agree to forgo it for smaller ones.

Smith said that the willingness to change the law reflects evolving knowledge about AIDS and testing.

When the D.C. law was adopted there was far more uncertainty about the reliability of the most common tests used to detect exposure, the ELISA and Western Blot. The tests when used in combination are believed to be about 98 percent accurate.

Last year, the Senate twice approved amendments to try to kill the D.C. law, but neither measure was approved by the full Congress. This year, Helms again introduced the amendment, after a vigorous lobbying effort by members of the Moral Majority and a group of nearly 600 Baptist ministers, who complained that the gay activists have too much political clout in the District and that many of their members are unable to purchase life insurance.

Spokesmen for the American Council of Life Insurance and the D.C. underwriters group said yesterday that they did not lobby for the amendment this year, but have focused on trying to reach agreement with city officials.