WASHINGTON — The Department of Veterans Affairs failed to comply with a law aimed at increasing the number of federal contracts awarded to small businesses owned by disabled veterans, a unanimous Supreme Court ruled Thursday.

The justices sided with Kingdomware Technologies, Inc., a veteran-owned contractor based in Maryland that said it should have been considered to provide services for a VA medical center.

The case is important to veterans groups that claimed the VA was wrongly interpreting bidding requirements in a way that deprived thousands of small companies owned by veterans. Those companies want a slice of the billions of dollars in contracts the VA awards every year.

Federal law requires the agency to use a bidding process if two or more disabled veteran-owned companies can offer service at a fair and reasonable price. But the VA argued the "rule of two" does not apply when it buys goods and services from vendors that already have contracts with the agency under a system called the Federal Supply Schedule.

Justice Clarence Thomas said the rule applies to all contract determinations.

A federal appeals court had said the VA did not have to follow the rule of two if it otherwise met the goal of awarding between 7 percent and 12 percent of all contracts to companies owned by disabled veterans. But Thomas said meeting annual benchmarks does not allow the VA to ignore a mandatory contracting rule.