WASHINGTON — The Supreme Court wrestled Monday with the First Amendment implications of a policy that forces private health organizations to denounce prostitution as a condition to get AIDS funding.
The court appeared divided, and not along ideological lines, in an argument over whether the antiprostitution pledge violates the health groups’ constitutional rights.
Four organizations that work in Africa, Asia, and South America are challenging the 2003 law. They say their work has nothing to do with prostitution.
The Obama administration says it is reasonable for the government to give money only to groups that oppose prostitution and sex trafficking because they contribute to the spread of HIV/AIDS.
A federal appeals court in New York struck down the pledge as an unacceptable intrusion on the groups’ right to speak freely. Another appeals court, in Washington, upheld the provision against a similar challenge.
Among the justices most receptive to the groups was Samuel Alito, who questioned whether the government could force a group to express agreement with a policy it opposes just to get money.
‘‘It seems to me like quite a dangerous proposition,’’ Alito, a conservative, said. Justices Ruth Bader Ginsburg and Sonia Sotomayor, both liberals, also aggressively challenged Justice Department lawyer Sri Srinivasan in his defense of the law.
By contrast, when David Bowker, the groups’ lawyer, said Congress is courting trouble when it decides whether to give money to an organization based on its viewpoint, Justice Antonin Scalia chimed in.
‘‘They can’t fund the Boy Scouts of America because they like the programs that the BSA has? They have to treat them equivalently with the Muslim Brotherhood? Is that really what you’re suggesting?’’ Scalia said.
Two groups — Alliance for Open Society International Inc., which runs a program in Central Asia to prevent the spread of HIV/AIDS by reducing drug use, and Pathfinder International, which provides family planning and reproductive health services in more than 20 countries — went to the courts after they adopted policy statements opposing prostitution in order to keep their eligibility for funding intact.
Pathfinder did so even though it wishes to remain neutral on the issue of prostitution, the appeals court said.
The other two groups are Global Health Council and Interaction.
The groups pointed out in court papers that the World Health Organization and other international organizations receive US funds to fight AIDS and do not have to comply with the anti-prostitution pledge.
Indeed, some of the international agencies support lesser penalties for prostitution as part of their AIDS-fighting strategy.
Sotomayor and Ginsburg both raised the issue to question the importance of the anti-prostitution pledge. ‘‘I would have less problem accepting your message if there weren’t four major organizations who were exempted from the policy requirement,’’ Sotomayor said.
Justice Elena Kagan is not taking part in the case, presumably because she worked on it while serving in the Justice Department. A decision is expected by late June.
In other action Monday:
■ The Supreme Court said it will hear an appeal from automaker Daimler AG that seeks to shut down a US lawsuit over allegations that its unit in Argentina played a role in that country’s “dirty war’’ in the 1970s.
The decision to hear a case involving alleged human rights abuses abroad follows last week’s decision in which the justices cut back on the use of a 1789 law, the Alien Tort Statute, by victims of atrocities.
The new case tests whether the company has sufficient ties to California to allow a lawsuit to be filed there, an important issue for both state and federal lawsuits against international companies that do business in the United States.
■ The Supreme Court rejected the government’s plea that it step into a dispute over judges’ pay. Instead, the court left in place a lower court ruling that said judges were entitled to cost-of-living increases promised to them by Congress but never paid.
Congress in 1989 limited federal judges’ ability to earn money outside of their job, giving them instead automatic cost-of-living increases. But Congress withheld those cost-of-living increases six times from 1995 to 2010, while giving other federal employees their promised increases.
The US Court of Appeals for the Federal Circuit in October ordered Congress to pay the six federal judges who sued for back pay, saying the Constitution specifies that compensation for federal judges cannot be reduced during their terms of office.
The high court’s decision will increase pay for all judges already on the federal bench.
■ The justices also refused to hear a challenge to an 89-year prison term given to an Ohio man for a rape he committed when he was 16. Chaz Bunch said the sentence violates the court’s 2010 ruling that prohibits prison terms with no realistic opportunity for release for people who were under 18 and did not kill anyone.
■ The high court heard arguments in a case questioning a Virginia law that would override a federal employee’s designation of a beneficiary in a federal insurance program.
Warren Hillman made Judy Maretta beneficiary of his Federal Employees’ Group Life Insurance policy before their divorce and his remarriage, and never changed his beneficiary designation.
The second wife sued, but the Virginia Supreme Court said the first wife should get the money because her name was on the form.