Federal employees who were fired because they did not sign up for the U.S. draft may not challenge the constitutionality of their dismissals in federal district courts, the Supreme Court ruled Monday.

The justices ruled 6 to 3 that Congress has set up a strict method for government employees to appeal their dismissals — first before the Merit Systems Protection Board and then the U.S. Court of Appeals for the Federal District — even if the claim is that the firing was unconstitutional.

Justice Clarence Thomas, writing for the majority, said the Civil Service Reform Act of 1978 was intended to replace a patchwork of statutes and rules that developed when employees had the right to challenge agency actions in district courts across the country.

The system would be undermined, he wrote, if it could be bypassed “simply by alleging that the statutory authorization for such action is unconstitutional.”

The case was brought by Michael B. Elgin, who was hired by the Internal Revenue Service in 1991. He was up for a promotion 11 years later when a background check revealed that he had failed to register for the Selective Service, as is required of men between ages 18 and 26.

Another federal law bars employment by executive branch agencies of men who knowingly and willfully failed to register. Elgin said he had been unaware of the Selective Service requirement as a younger man, but the government disagreed and fired him in 2007.

He appealed to the Merit Systems Protection Board, arguing among other things that the federal law barring his employment discriminated on the basis of sex, since only men are required to sign up for the draft.

An administrative law judge turned down his appeal, and said the MSPB lacked authority to determine the constitutionality of the statute that led to his dismissal. Elgin then took his claim to a district court and ultimately the U.S. Court of Appeals for the 1st Circuit in Boston.

The Supreme Court’s decision was not about the constitutionality of the statute in question, but the legal route Elgin must take. Lower courts have split on the question of which route is proper.

Thomas, joined by Chief Justice John G. Roberts Jr. and Justices Antonin Scalia, Anthony M. Kennedy, Stephen G. Breyer and Sonia Sotomayor, said the law was clear that the only avenue for Elgin was the federal circuit court.

The only exception, the majority said, is when an employee alleges that the firing violated a specific federal law outlawing discrimination.

The court’s dissenters said Elgin’s constitutional challenge was “a far cry from the type of claim that Congress intended to channel through” the MSPB. Such an administrative tribunal lacks the expertise and authority to decide constitutional claims, wrote Justice Samuel A. Alito Jr., who was joined by Justices Ruth Bader Ginsburg and Elena Kagan.

Such a path forces the Federal Circuit to address the constitutional issues without benefit of a full record developed at the administrative level, he wrote.

The case is Elgin v. Department of Treasury .