Lawyers at the Treasury Department and the Internal Revenue Service, above, didn’t see much of an issue, at first, with the Obamacare wording that has sent a case to the Supreme Court. (J. David Ake/Associated Press)

When the Supreme Court takes up the latest challenge to President Obama’s health-care law this week, how the justices interpret a six-word phrase in the bill could determine its fate.

The law, adopted in 2010, says the federal government can pay subsidies to help people afford insurance bought through “an Exchange established by the State.”

But two-thirds of the states have opted against setting up their own exchanges, and as a result, more Americans have been buying insurance through the federal insurance marketplace. Now, opponents of the law will make their case to the high court that Americans who are not using the state exchanges are ineligible for subsidies. And if they win, insurance premiums could skyrocket and many people might drop their coverage — possibly undermining the whole health-care program.

And as the justices weigh whether the health-care law in fact has a fatal glitch, one of the key questions is this: Why did the Obama administration rule-writing officials in the Internal Revenue Service and its parent agency, the Treasury Department, ultimately interpret the language the way they did?

It had never occurred to the Treasury Department official responsible for making the changes in the tax code required by the law that there was more than one way to read the phrase — until she happened across an article in a trade journal.

Emily McMahon, deputy assistant treasury secretary for tax policy, read an article in Bloomberg BNA’s Daily Tax Report in January 2011 raising questions about whether federal subsidies could be paid for millions of Americans buying insurance under the Affordable Care Act, according to Treasury Department officials. The issue was whether the law allowed these payments if the coverage was bought in states that did not set up their own insurance marketplaces.

So McMahon called a meeting with two of her top lawyers, one of them recalled, and asked whether there was “a glitch in the law we needed to worry about.”

In the end, the Treasury and IRS officials who wrote the rules adopted the more expansive reading of the law — allowing subsidies for all marketplaces — because they concluded this was required for the new health-care initiative to succeed, according to current and former agency officials and documents they provided to congressional investigators. And, the officials reasoned, Congress would not have passed a law that it wanted to fail.

“Nobody I talked to in government, including many people involved in the legislative process, thought this was a question,” recalled David Gamage, a tax law professor at the University of California at Berkeley hired to help the Treasury Department’s Office of Tax Policy implement the law. “Nobody thought the argument [limiting the subsidies] was persuasive.’’

While it was clear to the rules’ authors at Treasury and the IRS that the issue was a practical matter and not a political one, they met regularly with White House officials, who were closely monitoring the drafting of the regulations, two former officials said.

And while the team of tax attorneys had no doubt that the subsidies should apply to all marketplaces, there was a significant debate inside Treasury and the IRS about how much of their reasoning should be spelled out in public. The agency was sensitive to the legal and political minefield it was navigating.

The passage of the 955-page health-care law required officials to draft some of the biggest changes to the tax code in years. In weekly meetings in a fourth-floor conference room at IRS headquarters on the Mall, government lawyers deliberated over dozens of provisions of what would become Part 36B of the Internal Revenue Code, the rules governing the tax credits.

At first, the team of Treasury and IRS lawyers considered the subsidy question a minor issue, in part because it was widely expected that states would set up their own marketplaces.

“It didn’t occupy a lot of conversation, because it was not at all clear that a lot of states wouldn’t establish their own exchanges,” said Clarissa Potter, a deputy tax director at American International Group who was the IRS’s deputy chief counsel until May 2011.

When she learned that opponents of Obamacare were targeting the federal subsidies, Potter recalled, “I remember thinking: ‘Jeez, really? Is this the best you can do?’ ”

Among the officials drafting the regulations, the unanimous view was that the opponents didn’t have a case, according to Gamage, Potter and two others who were involved.

Gamage circulated a memo concluding that while the law contained some “awkwardly written” phrases, the best reading of the statutory language was that all Americans who are eligible receive the subsidies. He said the language deems federal marketplaces as a subset of the exchanges established by a state.

The team published a proposed rule in the Federal Register in August 2011, scheduled a public hearing for November and put the issue on the back burner, focusing on other tax issues in the law.

A day before the public hearing, an op-ed piece titled “Another ObamaCare Glitch” by Case Western Reserve University law professor Jonathan Adler and Michael F. Cannon, a health policy expert at the libertarian Cato Institute, appeared in the Wall Street Journal. They wrote that the IRS had no legal authority to give tax subsidies to people enrolling in a federal exchange. This argument became the foundation for the legal challenge to the law that is now coming before the Supreme Court.

Liz Fowler, a White House architect of the health-care law, read the opinion piece and forwarded it to nine lawyers at Treasury and the IRS. “You probably saw the WSJ article, but note that the hill is asking about a response,” she wrote. “Do you know if we are working on a response? Also might be aware that it could come up at tomorrow’s hearing — though I suppose you have thought about that possibility already.”

Jason Levitis, a Treasury lawyer, replied that the proposed regulations had “worked this issue.”

“If it comes up in the reg hearing tomorrow,” he wrote, “we will thank people for their comments and say we are taking them all into consideration.”

The Treasury and IRS team writing the regulations recognized that the environment was becoming highly charged.

“There was a sense that certain groups were going to sue,” Gamage said. “As increased pressure came from outside,” he said, the exchanges “moved up the issues list.”

House Republicans were writing to the administration opposing the proposed rules and pressing Treasury to document how it wrote the regulations. Investigators with the House Oversight and Ways and Means committees were increasingly frustrated that some of their requests were turned down and others met with redacted documents.

Treasury lawyers said they scoured the law’s legislative history, poring over committee reports and statements from lawmakers on the House and Senate floor that the tax credit applied to all Americans. “We dug into it,” said a former attorney on the Treasury-IRS team who requested anonymity because of the sensitivity of the case. “Certainly, it caused us to go back and look at our legal analysis.”

Discussions intensified inside Treasury and the IRS over how to show that the government had considered the opponents’ views but not draw media attention to the debate over subsidies, former officials recalled.

“The overriding concern was not generating negative news stories,” one former official said. Tax attorneys decided to be concise in drafting the regulation and issue a rule that was “not so minor that nothing is said, but minor enough that little is said,” the official recalled.

The final regulation contained language saying that Treasury would not adopt suggestions from some commenters that the subsidies should be restricted to state exchanges.

House Republicans were sharply critical, accusing the White House of urging the rule’s authors to ignore the text of the law. In a joint report, the House Oversight and Ways and Means committees charged the administration with failing to conduct a thorough review before writing the regulations.

At a House hearing in 2013, Douglas Shulman, the IRS commissioner at the time, acknowledged that the law contained “some contradictory language” on exchanges. But he said the government “exercised the rule-writing authority that is delegated to the Secretary of the Treasury in every tax bill.”

Alice Crites contributed to this report.