The Supreme Court ruled yesterday that federal taxpayers cannot challenge the constitutionality of White House efforts to help religious groups obtain government funding for their social programs, handing a victory to President Bush's faith-based initiatives program.

In a 5 to 4 decision, the court blocked a lawsuit by a Wisconsin-based group of atheists and agnostics against the White House Office of Faith-Based and Community Initiatives. The court ruled that the suit, by the Freedom From Religion Foundation and three of its taxpaying members, could not go forward because ordinary taxpayers lack legal standing to challenge executive branch expenditures. The ruling reversed a January 2006 decision in favor of the foundation by the U.S. Court of Appeals for the 7th Circuit.

Liberal groups blasted the court's decision in Hein v. Freedom From Religion Foundation as a setback for the First Amendment and a sop to the religious right, while the White House and religious conservatives hailed it as a major triumph for Bush's program.

The foundation had complained that parts of the program favored religious groups over secular ones, violating the establishment clause of the First Amendment, which says in part that "Congress shall make no law respecting an establishment of religion."

The administration argued that the foundation's taxpayer plaintiffs lacked standing to sue because the faith-based initiatives office was not specifically funded by Congress.

In an opinion joined by Chief Justice John G. Roberts Jr. and Justice Anthony M. Kennedy, Justice Samuel A. Alito Jr. wrote that "the payment of taxes is generally not enough to establish standing to challenge an action taken by the federal government." If it were, and every taxpayer could sue to challenge any government expenditure, the federal courts would be relegated to "general complaint bureaus," he wrote.

Alito's opinion stopped short of repudiating a 1968 Supreme Court ruling in Flast v. Cohen, in which the court recognized a narrow exception to the rule against federal taxpayer standing in an establishment-clause case.

While denouncing the decision, groups supporting separation of church and state took heart that only two justices favored overturning Flast. This means that most church-state lawsuits can proceed, they said.

Justices Antonin Scalia and Clarence Thomas concurred in the judgment but held that Flast should be overturned because it has spawned "notoriously inconsistent" rulings.

Justice David H. Souter wrote a dissenting opinion joined by Justices John Paul Stevens, Ruth Bader Ginsburg and Stephen G. Breyer. Yesterday's decision "closes the door on these taxpayers because the Executive Branch, and not the Legislative Branch, caused their injury," he wrote. "I see no basis for this distinction in either logic or precedent."