On Capitol Hill, the advocates found willing partners in Tea Party conservatives, who have repeatedly threatened to shut down the government if they do not get their way on spending issues. This time they said they were so alarmed by the health law that they were willing to risk a shutdown over it. (“This is exactly what the public wants,” Representative Michele Bachmann of Minnesota, founder of the House Tea Party Caucus, said on the eve of the shutdown.)

Despite Mrs. Bachmann’s comments, not all of the groups have been on board with the defunding campaign. Some, like the Koch-financed Americans for Prosperity, which spent $5.5 million on health care television advertisements over the past three months, are more focused on sowing public doubts about the law. But all have a common goal, which is to cripple a measure that Senator Ted Cruz, a Texas Republican and leader of the defunding effort, has likened to a horror movie.

“We view this as a long-term effort,” said Tim Phillips, the president of Americans for Prosperity. He said his group expected to spend “tens of millions” of dollars on a “multifront effort” that includes working to prevent states from expanding Medicaid under the law. The group’s goal is not to defund the law.

“We want to see this law repealed,” Mr. Phillips said.

A Familiar Tactic

The crowd was raucous at the Hilton Anatole, just north of downtown Dallas, when Mr. Needham’s group, Heritage Action, arrived on a Tuesday in August for the second stop on a nine-city “Defund Obamacare Town Hall Tour.” Nearly 1,000 people turned out to hear two stars of the Tea Party movement: Mr. Cruz, and Jim DeMint, a former South Carolina senator who runs the Heritage Foundation.

“You’re here because now is the single best time we have to defund Obamacare,” declared Mr. Cruz, who would go on to rail against the law on the Senate floor in September with a monologue that ran for 21 hours. “This is a fight we can win.”

Although Mr. Cruz is new to the Senate, the tactic of defunding in Washington is not. For years, Congress has banned the use of certain federal money to pay for abortions, except in the case of incest and rape, by attaching the so-called Hyde Amendment to spending bills.

After the health law passed in 2010, Todd Tiahrt, then a Republican congressman from Kansas, proposed defunding bits and pieces of it. He said he spoke to Mr. Boehner’s staff about the idea while the Supreme Court, which upheld the central provision, was weighing the law’s constitutionality.