The US Supreme Court split Monday over the free speech implications of law compelling private health groups to denounce prostitution as a condition for receiving HIV/AIDS funding.

On whether the law violates the groups' constitutional rights, the court appeared to divide — but not along political lines. The law is supported, and opposed, by republicans and democrats alike. President Barack Obama and former President George W. Bush both support the law, with ideologically opposed justices Samuel Alito, a republican, and democrats Ruth Bader Ginsburg and Sonia Sotomayor questioning the law.

Four health organizations with operations in Africa, Asia and South America are challenging the 2003 law in "Agency for International Development v. Alliance for Open Society International, Inc." The groups say their work has nothing to do with prostitution, or sex trafficking, pointing to international bodies such as the World Health Organization that support lesser penalties for prostitution as a way to fight AIDS.

Alito questioned whether the government could compel a group to express agreement with policy as a condition for receiving money. "It seems to me like quite a dangerous proposition," Alito said.

However, fellow conservative justice Antonin Scalia differed. The government "can't fund the Boy Scouts of America because they like the programs that the BSA has?" he said. "They have to treat them equivalently with the Muslim Brotherhood? Is that really what you're suggesting?"

In keeping with the Bush administration's position, the White House says that aside from First Amendment implications it is reasonable to fund only groups that oppose opposition, given that prostitution and sex trafficking contribute to the spread of the disease. The court granted certiorari for the law challenge after a New York federal appeals court struck down the law on free speech grounds, after which an appeals court in Washington upheld the law in a similar case.

The challenges were brought challenges to the federal law, including Alliance for Open Society International Inc., which operates in Central Asia, and Pathfinder International, which provides reproductive health services in more than 20 countries. Pathfinder said the group wished to remain neutral on the issue of prostitution.

Ginsburg and Sotomayor both questioned the validity of the anti-prostitution pledge. "I would have less [of a] problem accepting your message if there weren't four major organizations who were exempted from the policy requirement," Sotomayor said.

Absent from the hearing was Justice Elena Kagan, who presumably recused herself after working on the case while serving in the U.S. Department of Justice.