Pity Robert Long. The Washington-based lawyer was specially invited by the Supreme Court to make the case for a legal position that neither party in the health-care challenge was willing to take.

Yet no sooner did he launch into his argument at Monday’s hearing than the justices began ripping it to shreds.

“That’s not the way the statute reads . . . that’s carrying it too far,” Justice Sonia Sotomayor objected at one point.

“It seems you can’t separate those two points,” Chief Justice John G. Roberts Jr. complained at another.

“It seems to me it’s a question you can’t answer,” Justice Antonin Scalia concluded.

Such can be the lot of the “amici curiae,” or friends of the court, whom the Supreme Court justices tap when they want to hear a side of an issue that no one else involved supports.

And it’s the fate that could await H. Bartow Farr III, who will come before the justices on Wednesday, the third and final day of hearings on the challenge to the 2010 health-care law.

Farr, a private lawyer and longtime member of the Supreme Court bar, will argue that even if the court invalidates the law’s mandate that nearly all Americans obtain insurance or pay a penalty, it should leave the rest of the law intact. (The government argues that if the mandate goes, so should several of the law’s regulations on insurers. The law’s challengers contend that the entire statute should be overturned.)

Long’s presentation on Monday posited that an obscure 19th-century tax law precludes the court from ruling on the insurance mandate at this time.

It’s a rare privilege to be asked to take on such a job. According to a recent study published in the Stanford Law Review, the court has appointed only about 45 amici curiae since 1954 — roughly twice every three terms. (Justices can call on them for a range of reasons, including failure by one of the parties to appear before the court.)

They often pick either seasoned veterans or younger former clerks who they deem worthy of the résuméboost that comes from appearing before the court.

And there’s always the chance that the amicus will be on the winning side of the argument. That’s a prospect that troubled Brian Goldman, the author of the Stanford Law Review study of the use of amici curiae.

Goldman, who declined to comment for this report because he is now employed by the Justice Department, suggested in the study that the court risked running afoul of the Constitution’s stipulation that federal courts should decide only actual controversies.

“To the extent that appointing an amicus enables the Court to resolve legal questions that are not squarely presented by a live controversy, the practice itself should be abandoned, lest the Court appear to be reaching out to address issues that do not arise organically,” he wrote.

But Stephen McAllister did not hesitate when he got the call for a case the court heard last year. A law professor at the University of Kansas, he had already come before the court four times representing clients.

“Maybe there are people who feel they can afford to say no,” he said. “I certainly didn’t. It’s a great honor.”

It was also a daunting mission. The work is unpaid, and without the support staff of a law firm, McAllister had to pull long hours to prepare his briefs and argument.

“It was basically almost three months of work,” he said. “It wasn’t the only thing I was doing, but it took a lot of time.”

Then there was the challenge of defending a position that McAllister himself considered far-fetched at best. “Friends of mine were saying things like, ‘You were dealt a hand with no cards,’ ” he said with a laugh.

He said his sympathy has been with Long and Farr this week.

“I empathize because there may have been a moment or two when one of the justices was asking me a question from the bench, not buying the argument I was making, when I just wanted to say, ‘But you asked me to make these arguments,’ ” he said, laughing again. “There is a sense of, ‘Don’t be so hard on me. I’m just doing what you asked me to do.

“ ‘And I’m doing it pro bono.’ ”