A federal judge on Thursday upheld the authority of the federal government to require everyone to have health insurance, dealing a setback to groups seeking to block the new national health care plan.

The ruling came in a lawsuit filed in Michigan by a Christian legal group and four people who claimed lawmakers exceeded their power under the Constitution’s commerce clause.