BELGRADE, Mont.  President Obama on Friday accused some insurance companies of trying to undermine his plans for overhauling health care by “funding in opposition,” a comment that could inflame tensions at a time when Mr. Obama is hoping to keep insurers at the negotiating table.

The president, who did not mention any company by name, made the comment in a question and answer session at a town-hall-style meeting here. He was responding to an insurance salesman who challenged him on why the White House had decided to “vilify the insurance companies” by shifting its strategy from talking about reshaping health care to emphasizing changes in health insurance.

“O.K., that’s a fair question,” Mr. Obama told the salesman, Marc Montgomery of Helena. He went on to say that some companies have “been constructive,” citing Aetna, whose chief executive, Ronald A. Williams, is a major Obama supporter. Mr. Obama then criticized other companies, though not by name.

“Now, I want to just be honest with you, and I think Max will testify,” Mr. Obama said, referring to Senator Max Baucus, the Montana Democrat and chairman of the Senate Finance Committee, who is spearheading the Senate legislation. “In some cases what we’ve seen is also funding in opposition by some other insurance companies to any kind of reform proposals.”