WASHINGTON (AP) _ Former Sen. Paul Tsongas of Massachusetts, the only declared candidate for the Democratic presidential nomination, said Sunday that if elected president he would consider a means test for Social Security recipients.

Appearing on NBC-TV's ''Meet the Press,'' Tsongas was asked how he would achieve his goal of cutting the increase in spending on government entitlement programs to a level 1 percent below the inflation rate.

Such proposals could succeed only ''if the country understands, my gosh, there really is an economic storm coming,'' he said.

Asked if he would favor a means test for entitlement programs such as Social Security, he said, ''I think you have to look at all of that. I would look at a means test.''

The same issue came up in the 1988 campaign for the Democratic nomination, when former Arizona Gov. Bruce Babbitt proposed that the Social Security benefits of wealthy retirees be subject to taxation.

Babbitt proposed what he described as a ''needs test,'' a threshold of $100,000 or $75,000 a year above which benefits would be taxable.

Babbitt withdrew from the presidential race in 1988 after trailing in several primaries.

Tsongas gave no details on what kinds of means test he would consider.

Tsongas also was asked whether the United States should attack Iraq if Saddam Hussein is found to be hiding nuclear weapons materials.

''In the last analysis, you have to take out his nuclear capability,'' the former senator said. ''I think the United Nations should be the first recourse, but in the last analysis, that nuclear capability has to be taken out.''

Tsongas said he has ''great respect for Clarence Thomas's personal history'' but would not have nominated him for the Supreme Court. He said he did not know, at this point, whether he would vote for him if he were still in the Senate.

He said he favors mandatory AIDS testing for doctors and other health care givers. Referring to legislation passed by the Senate, however, he said that ''the idea of a 10-year jail term for a doctor who did not do it is extraordinary, and I think takes it to the point of being ridiculous.''

On the testing, he said, ''You have to do it. AIDS is such a compelling issue that I think we have to attack it on the broad front, and I would mandate testing.''