In the instant matter nonprofits who received federal grants to fight AIDS overseas were required by a 2003 law to explicitly oppose prostitution and sex trafficking. The main rule in this regard stipulated that groups that promoted prostitution may not receive federal funding.
Nonprofits did not have anything against the rule against promoting prostitution, but a companion rule asked grant recipients to have a policy "explicitly opposing prostitution and sex trafficking."
This, argued the non profits, was self-defeating in providing grants to fight AIDS in as much as it alienated the nonprofits from the target population of sex workers and made realistic intervention impossible.
Writing for a 6-2 court, Chief Justice John Roberts observed that while in some circumstances the government can limit a grantee's speech while conducting activities that were public funded, compelling grantees to promote official views violated free-speech rights.
Roberts observed, "as a general matter, if a party objects to a condition on the receipt of federal funding, its recourse is to decline the funds," but there is a limit. In this matter, the Supreme Court observed that the Congress went "beyond defining the limits of the federally funded program to defining the recipient."
While, in dissent, Justice Scalia, joined by Justice Clarence Thomas observed it was "nothing more than a means of selecting suitable agents to implement the Government's chosen strategy," the majority observed, "It is about compelling a grant recipient to adopt a particular belief as a condition of funding."
The Chief Justice quoted a 1943 decision by Justice [Robert] Jackson to substantiate the views of the majority - "If there is any fixed star in our constitutional constellation, it is that no official, high or petty, can prescribe what shall be orthodox in politics, nationalism, religion, or other matters of opinion."